# CVE-2021-4001: A race condition was found in the Linux kernel's ebpf verifier between bpfmapupdateelem and bpfmapfreeze due to a missing lock in kernel/bp…

- Severity: Medium 4.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2022-01-21T00:00:00.000Z
- Modified: 2026-10-08T21:17:42.587Z
- Weaknesses: CWE-367
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

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

(As written by CVE List.)

## Affected

- kernel: kernel 5.16 rc2
- linux linux_kernel: up to 5.15; 5.16

## Every score

- NVD: CVSS:3.1 4.1 Medium `CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 4.7 Medium `AV:L/AC:M/Au:N/C:N/I:C/A:N`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=2025645> (issue-tracking, patch, third-party-advisory)
- <https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=353050be4c19e102178ccc05988101887c25ae53> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-4001](https://www.cve.org/CVERecord?id=CVE-2021-4001), CVE Terms of Use, modified 2026-10-08
- NVD: [CVE-2021-4001](https://nvd.nist.gov/vuln/detail/CVE-2021-4001), Public domain, modified 2026-10-08

---

Page: https://cve.day/CVE-2021-4001 · Whole record: https://cve.day/CVE-2021-4001.json · Rebuilt by cve.day 2026-11-25T22:58:06.616Z
