Skip to content
Snippets Groups Projects
Commit 819cec1d authored by Haoyu Li's avatar Haoyu Li Committed by Greg Kroah-Hartman
Browse files

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: 3d679d5a ("virt: acrn: Introduce interfaces to query C-states and P-states allowed by hypervisor")
Signed-off-by: default avatarHaoyu Li <lihaoyu499@gmail.com>
Cc: stable <stable@kernel.org>
Acked-by: default avatarFei Li <fei1.li@intel.com>
Link: https://lore.kernel.org/r/20250130115811.92424-1-lihaoyu499@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e77aff55
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment