mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: Use zero-ed memory for PVH acpi tables
xl/libxl memory is leaking into a PVH guest through uninitialized portions of the ACPI tables. Use libxl_zalloc() to obtain zero-ed memory to avoid this issue. This is XSA-464 / CVE-2024-45819. Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Fixes:14c0d328da("libxl/acpi: Build ACPI tables for HVMlite guests") Reviewed-by: Jan Beulich <jbeulich@suse.com> master commit:0bfe567b58master date: 2024-11-12 13:32:45 +0100
This commit is contained in:
1 parent
1eb843cd24
commit
78f66ae66f
1 file changed
+4
-3
@@ -176,10 +176,11 @@ int libxl__dom_load_acpi(libxl__gc *gc,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
config.rsdp = (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size);
|
/* These are all copied into guest memory, so use zero-ed memory. */
|
||||||
config.infop = (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size);
|
config.rsdp = (unsigned long)libxl__zalloc(gc, libxl_ctxt.page_size);
|
||||||
|
config.infop = (unsigned long)libxl__zalloc(gc, libxl_ctxt.page_size);
|
||||||
/* Pages to hold ACPI tables */
|
/* Pages to hold ACPI tables */
|
||||||
libxl_ctxt.buf = libxl__malloc(gc, NUM_ACPI_PAGES *
|
libxl_ctxt.buf = libxl__zalloc(gc, NUM_ACPI_PAGES *
|
||||||
libxl_ctxt.page_size);
|
libxl_ctxt.page_size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||