Commit 30773f76 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Zheng Zucheng
Browse files

KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak

stable inclusion
from stable-v5.10.54
commit e14ef1095387f764d95614d3ec9e4d07c82a3533
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4H1
CVE: CVE-2021-47296

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e14ef1095387f764d95614d3ec9e4d07c82a3533



--------------------------------

[ Upstream commit bc4188a2 ]

vcpu_put is not called if the user copy fails. This can result in preempt
notifier corruption and crashes, among other issues.

Fixes: b3cebfe8 ("KVM: PPC: Move vcpu_load/vcpu_put down to each ioctl case in kvm_arch_vcpu_ioctl")
Reported-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210716024310.164448-2-npiggin@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: default avatarZheng Zucheng <zhengzucheng@huawei.com>
parent 91b7ac39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment