android_kernel_oneplus_sm8250/drivers/virt
Navid Emamdoost c2ea451f22 virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr
[ Upstream commit e0b0cb9388642c104838fac100a4af32745621e2 ]

In hgcm_call_preprocess_linaddr memory is allocated for bounce_buf but
is not released if copy_form_user fails. In order to prevent memory leak
in case of failure, the assignment to bounce_buf_ret is moved before the
error check. This way the allocated bounce_buf will be released by the
caller.

Fixes: 579db9d45c ("virt: Add vboxguest VMMDEV communication code")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20190930204223.3660-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-06 13:06:04 +01:00
..
vboxguest virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr 2019-11-06 13:06:04 +01:00
fsl_hypervisor.c drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:41:31 +02:00
Kconfig virt: Add vboxguest driver for Virtual Box Guest integration 2017-12-18 16:12:22 +01:00
Makefile virt: Add vboxguest driver for Virtual Box Guest integration 2017-12-18 16:12:22 +01:00