Commit 2567bb3b authored by Haimin Zhang's avatar Haimin Zhang Committed by Yongqiang Liu
Browse files

KVM: x86: Handle SRCU initialization failure during page track init

stable inclusion
from stable-v5.10.71
commit deb2949417677649e2413266d7ce8c2ff73952b4
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RFI8


CVE: CVE-2021-47407

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

commit eb7511bf upstream.

Check the return of init_srcu_struct(), which can fail due to OOM, when
initializing the page track mechanism.  Lack of checking leads to a NULL
pointer deref found by a modified syzkaller.

Reported-by: default avatarTCS Robot <tcs_robot@tencent.com>
Signed-off-by: default avatarHaimin Zhang <tcs_kernel@tencent.com>
Message-Id: <1630636626-12262-1-git-send-email-tcs_kernel@tencent.com>
[Move the call towards the beginning of kvm_arch_init_vm. - Paolo]
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 80ab23a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment