CVE-2021-3490 Linux kernel eBPF bitwise ops ALU32 bounds tracking

High 7.8 Published Updated

Improper bounds tracking in eBPF ALU32 bitwise operations allows out-of-bounds reads and writes, leading to arbitrary code execution in the Linux kernel.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-3490?

CVE-2021-3490 is a high-severity memory corruption vulnerability in Canonical Ubuntu Linux, published on 4 Jun 2021. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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).

Weakness: CWE-125, CWE-787, CWE-20

Which versions are affected by CVE-2021-3490?

It affects 2 products.

Products include Canonical Ubuntu Linux, Linux kernel.

How do I fix CVE-2021-3490?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-3490 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-3490 exists.

Public exploit code: 1 Metasploit module and 5 proofs of concept on GitHub.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as A-190876666, DEBIAN-CVE-2021-3490, GHSA-9wfm-q59x-qc3x, PUB-A-190876666, UBUNTU-CVE-2021-3490.

Is CVE-2021-3490 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free