{"id":"CVE-2021-3490","published":"2021-06-04T01:40:20Z","modified":"2024-09-16T22:29:57Z","title":"Linux kernel eBPF bitwise ops ALU32 bounds tracking","vendor":"Linux","product":"Linux kernel","tier":"tail","description":{"text":"The eBPF ALU32 bounds tracking for bitwise ops (AND, OR and XOR) in the Linux kernel did not properly update 32-bit bounds, which could be turned into out of bounds reads and writes in the Linux kernel and therefore, arbitrary code execution. This issue was fixed via commit 049c4e13714e (\"bpf: Fix alu32 const subreg bound tracking on bitwise operations\") (v5.13-rc4) and backported to the stable kernels in v5.12.4, v5.11.21, and v5.10.37. The AND/OR issues were introduced by commit 3f50f132d840 (\"bpf: Verifier, do explicit ALU32 bounds tracking\") (5.7-rc1) and the XOR variant was introduced by 2921c90d4718 (\"bpf:Fix a verifier failure with xor\") ( 5.10-rc1).","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.27381,"percentile":0.98107,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://ubuntu.com/security/notices/USN-4950-1","tags":["vendor-advisory","x_refsource_UBUNTU"]},{"url":"https://ubuntu.com/security/notices/USN-4949-1","tags":["vendor-advisory","x_refsource_UBUNTU"]},{"url":"https://www.openwall.com/lists/oss-security/2021/05/11/11","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=049c4e13714ecbca567b4d5f6d563f05d431c80e","tags":["x_refsource_MISC"]},{"url":"https://www.zerodayinitiative.com/advisories/ZDI-21-606/","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20210716-0004/","tags":["x_refsource_CONFIRM"]},{"url":"http://packetstormsecurity.com/files/164015/Linux-eBPF-ALU32-32-bit-Invalid-Bounds-Tracking-Local-Privilege-Escalation.html","tags":["x_refsource_MISC"]}],"priority":{"score":30.1,"factors":[{"name":"EPSS percentile","points":19.62},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.46}]},"exploitSources":{"pocGithub":{"count":3,"skipped":2,"earliest":"2021-06-24","earliestUrl":"https://github.com/chompie1337/Linux_LPE_eBPF_CVE-2021-3490","repos":[{"name":"chompie1337/Linux_LPE_eBPF_CVE-2021-3490","url":"https://github.com/chompie1337/Linux_LPE_eBPF_CVE-2021-3490","stars":317,"created":"2021-06-24"},{"name":"pivik271/CVE-2021-3490","url":"https://github.com/pivik271/CVE-2021-3490","stars":2,"created":"2023-04-06"},{"name":"sandesh9978/cve-2021-3490-ebpf-analysis","url":"https://github.com/sandesh9978/cve-2021-3490-ebpf-analysis","stars":0,"created":"2026-03-03"}]},"metasploit":[{"name":"Linux eBPF ALU32 32-bit Invalid Bounds Tracking LPE","module":"exploit/linux/local/cve_2021_3490_ebpf_alu32_bounds_check_lpe","type":"exploit","disclosureDate":"2021-05-11","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/cve_2021_3490_ebpf_alu32_bounds_check_lpe.rb"}],"first":{"date":"2021-05-11","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/cve_2021_3490_ebpf_alu32_bounds_check_lpe.rb"},"provenance":"source"},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux kernel","versions":[">= trunk, < v5.13-rc4",">= linux-5.12.y, < v5.12.4",">= linux-5.11.y, < v5.11.21",">= linux-5.10.y, < v5.10.37",">= v5.7-rc1, < 5.7*"]}],"summary":{"text":"The Linux kernel's eBPF verifier fails to correctly update 32-bit bounds tracking for the bitwise operations AND, OR and XOR, leaving the ALU32 bounds state inconsistent. An attacker who can load eBPF programs on a local system, with low privileges and requiring high attack complexity, could exploit this to perform out-of-bounds reads and writes in the kernel and potentially execute arbitrary code.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:28:02Z"},"euvd":{"id":"EUVD-2021-26812","exploited":false,"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/164015/Linux-eBPF-ALU32-32-bit-Invalid-Bounds-Tracking-Local-Privilege-Escalation.html"]}