mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xenstored: fix live update with watches specifying depth
Due to a typo the state record for a watch specifying a depth is
written only partially. Instead of using the correct length of the
xs_state_watch_ext structure only the length of the xs_state_watch
structure was used when writing the data.
Fix that by using the correct length.
This is XSA-514 / CVE-2026-79607
Fixes: db98de120c ("tools/xenstored: add depth information to watches")
Reported-by: Andrii Sultanov <andriy.sultanov@vates.tech>
Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
c89185286c
commit
6b30eca0e3
1 file changed
+1
-1
@@ -354,7 +354,7 @@ const char *dump_state_watches(FILE *fp, struct connection *conn,
|
|||||||
return "Dump watch state error";
|
return "Dump watch state error";
|
||||||
|
|
||||||
if (watch->depth >= 0) {
|
if (watch->depth >= 0) {
|
||||||
if (fwrite(&swe, sizeof(sw), 1, fp) != 1)
|
if (fwrite(&swe, sizeof(swe), 1, fp) != 1)
|
||||||
return "Dump watch state ext error";
|
return "Dump watch state ext error";
|
||||||
} else {
|
} else {
|
||||||
if (fwrite(&sw, sizeof(sw), 1, fp) != 1)
|
if (fwrite(&sw, sizeof(sw), 1, fp) != 1)
|
||||||
|
|||||||