linux/drivers/virt
Haoyu Li 4e15cf870d drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl
commit 819cec1dc4 upstream.

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>
History 2025-03-13 12:51:11 +01:00
..
acrn drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl 2025-03-13 12:51:11 +01:00
nitro_enclaves nitro_enclaves: Use get_user_pages_unlocked() call to handle mmap assert 2022-01-05 12:42:39 +01:00
vboxguest vboxguest: Do not use devm for irq 2022-08-25 11:40:33 +02:00
fsl_hypervisor.c drivers/virt/fsl_hypervisor: Fix error handling path 2020-09-07 14:57:31 +02:00
Kconfig virt: acrn: Introduce ACRN HSM basic driver 2021-02-09 10:58:18 +01:00
Makefile virt: acrn: Introduce ACRN HSM basic driver 2021-02-09 10:58:18 +01:00