linux/drivers/virt/acrn
Haoyu Li 819cec1dc4 drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl
In the "pmcmd_ioctl" function, three memory objects allocated by
kmalloc are initialized by "hcall_get_cpu_state", which are then
copied to user space. The initializer is indeed implemented in
"acrn_hypercall2" (arch/x86/include/asm/acrn.h). There is a risk of
information leakage due to uninitialized bytes.

Fixes: 3d679d5aec ("virt: acrn: Introduce interfaces to query C-states and P-states allowed by hypervisor")
Signed-off-by: Haoyu Li <lihaoyu499@gmail.com>
Cc: stable <stable@kernel.org>
Acked-by: Fei Li <fei1.li@intel.com>
Link: https://lore.kernel.org/r/20250130115811.92424-1-lihaoyu499@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-20 15:20:34 +01:00
..
Kconfig
Makefile
acrn_drv.h virt: acrn: Annotate struct vm_memory_region_batch with __counted_by 2023-10-08 22:46:04 -07:00
hsm.c drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl 2025-02-20 15:20:34 +01:00
hypercall.h virt: acrn: Introduce interfaces for virtual device creating/destroying 2021-10-05 16:14:10 +02:00
ioeventfd.c eventfd: simplify eventfd_signal() 2023-11-28 14:08:38 +01:00
ioreq.c virt: acrn: replace deprecated strncpy with strscpy 2024-04-24 16:44:29 -07:00
irqfd.c assorted variants of irqfd setup: convert to CLASS(fd) 2024-11-03 01:28:07 -05:00
mm.c acrn: use the new follow_pfnmap API 2024-09-17 01:06:59 -07:00
vm.c