]> git.ipfire.org Git - thirdparty/linux.git/commit
mshv_vtl: clear hypercall output before copyout
authorYousef Alhouseen <alhouseenyousef@gmail.com>
Thu, 25 Jun 2026 18:13:14 +0000 (20:13 +0200)
committerWei Liu <wei.liu@kernel.org>
Wed, 22 Jul 2026 23:51:04 +0000 (23:51 +0000)
commitb496f042e0da26dd673806870c204adfe697f169
tree5c9719164b78d79f4cba2024bdcc443ee46ec774
parentab96bc97cdcf77c6f38634c73d00074c4f92c324
mshv_vtl: clear hypercall output before copyout

mshv_vtl_hvcall_call() copies output_size bytes to userspace.

The output page is freshly allocated. Userspace chooses the copyout length.

If the hypercall writes less, the tail can contain stale page data.

Clear the copied range before issuing the hypercall.

Also check both bounce page allocations before either page is used.

Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/mshv_vtl_main.c