CVE-2021-4001 Race condition in kernel

Medium 4.1 Published Updated

A local attacker with specific privileges can exploit a race condition in the eBPF verifier to modify frozen memory, potentially escalating privileges.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-4001?

CVE-2021-4001 is a medium-severity vulnerability in Linux kernel, published on 21 Jan 2022. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A race condition was found in the Linux kernel's ebpf verifier between bpf_map_update_elem and bpf_map_freeze due to a missing lock in kernel/bpf/syscall.c. In this flaw, a local user with a special privilege (cap_sys_admin or cap_bpf) can modify the frozen mapped address space. This flaw affects kernel versions prior to 5.16 rc2.

Weakness: CWE-367

Which versions are affected by CVE-2021-4001?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-4001?

Apply the vendor's patch.

Is CVE-2021-4001 being exploited?

There is no known exploitation of CVE-2021-4001 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-4001, GHSA-q6qm-pxcx-gj5h, UBUNTU-CVE-2021-4001.

Is CVE-2021-4001 in your software?

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

Check your SBOMs for free