CVE-2021-34866: Linux Kernel eBPF Type Confusion Privilege Escalation Vulnerability
A vulnerability was found in Linux Kernel, where a type confusion problem in checkmapfunccompatibility() may lead to free arbitrary kernel memory.
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=5b029a32cfe4600f5e10e36b41778506b90fd4de https://www.zerodayinitiative.com/advisories/ZDI-21-1148/
Other sources
In checkmapfunccompatibility of verifier.c, there is a possible way to escalate privileges due to type confusion. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation.
— OSV
This vulnerability allows local attackers to escalate privileges on affected installations of Linux Kernel 5.14-rc3. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability. The specific flaw exists within the handling of eBPF programs. The issue results from the lack of proper validation of user-supplied eBPF programs, which can result in a type confusion condition. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the kernel. Was ZDI-CAN-14689.
This vulnerability allows local attackers to escalate privileges on affected installations of Linux Kernel. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability. The specific flaw exists within the handling of eBPF programs. The issue results from the lack of proper validation of user-supplied eBPF programs, which can result in a type confusion condition. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the kernel.
— ZDI
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/Kernelto a version that resolves this vulnerability.Fixed in 5.14 - Upgrade
Upgrade
android/:linux_kernel:to a version that resolves this vulnerability.Fixed in :2022-04-05 - Upgrade
Upgrade
Linux Kernelto a version that resolves this vulnerability.Patch 5b029a32cfe4600f5e10e36b41778506b90fd4de
Event History
Frequently Asked Questions
What is CVE-2021-34866?
CVE-2021-34866 is a vulnerability in the Linux Kernel that allows local attackers to escalate privileges on affected installations.
What is the severity of CVE-2021-34866?
CVE-2021-34866 has a severity value of 8.8, which is considered high.
Which software versions are affected by CVE-2021-34866?
CVE-2021-34866 affects Linux Kernel versions 5.8 to 5.10.62, and versions 5.11 to 5.13.14.
How can an attacker exploit CVE-2021-34866?
To exploit CVE-2021-34866, an attacker must first obtain the ability to execute low-privileged code on the target system.
Where can I find more information about CVE-2021-34866?
You can find more information about CVE-2021-34866 at the following references: [ZDI-21-1148](https://www.zerodayinitiative.com/advisories/ZDI-21-1148/) and [Netapp Advisory](https://security.netapp.com/advisory/ntap-20220217-0008/).