Use-after-free in Linux kernel - CVE-2021-29657
Published: July 25, 2022
Vulnerability identifier: #VU65770
CSH Severity: Medium
CVSS v4: 7.7 [CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-29657
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability:
No public exploit available
Vulnerability details
The vulnerability allows a remote user to compromise vulnerable system.
The vulnerability exists due to a use-after-free error in arch/x86/kvm/svm/nested.c. An AMD KVM guest can bypass access control on host OS MSRs when there are nested guests and execute arbitrary code on the hypervisor.
Affected software
Linux kernel
Ubuntu
linux-image-5.10.0-1026-oem (Ubuntu package)
linux-image-oem-20.04b (Ubuntu package)
Ubuntu
linux-image-5.10.0-1026-oem (Ubuntu package)
linux-image-oem-20.04b (Ubuntu package)
How to mitigate CVE-2021-29657
Install updates from vendor's website.
Linux kernel - update to 5.11.12
linux-image-5.10.0-1026-oem (Ubuntu package) - update to 5.10.0-1026.27
linux-image-oem-20.04b (Ubuntu package) - update to 5.10.0.1026.27
linux-image-5.10.0-1026-oem (Ubuntu package) - update to 5.10.0-1026.27
linux-image-oem-20.04b (Ubuntu package) - update to 5.10.0.1026.27
External References
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a58d9166a756a0f4a6618e4f593232593d6df134
- https://bugs.chromium.org/p/project-zero/issues/detail?id=2177
- https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.11.12
- http://packetstormsecurity.com/files/163324/KVM-nested_svm_vmrun-Double-Fetch.html
- https://security.netapp.com/advisory/ntap-20210902-0008/