Skip to content
Fencer Vulns
medium 4.1

CVE-2021-4001 json

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 kern…

published 2022-01-21 4 y ago modified 2026-10-08 31 d ago also EUVD-2021-33908

cvss
4.1
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 8%
public exploits
0
none known

Summary

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.

Patch / fix

  • linux Debian 14, Debian 13, Debian 12 5.15.5-1

debian advisories DEBIAN-CVE-2021-4001

  • linux Ubuntu 20.04 LTS 5.4.0-164.181
  • linux-aws Ubuntu 20.04 LTS 5.4.0-1111.120
  • linux-gcp Ubuntu 20.04 LTS 5.4.0-1115.124
  • linux-ibm Ubuntu 20.04 LTS 5.4.0-1058.63
  • linux-iot Ubuntu 20.04 LTS 5.4.0-1023.24
  • linux-kvm Ubuntu 20.04 LTS 5.4.0-1100.106
  • linux-azure Ubuntu 20.04 LTS 5.4.0-1117.124
  • linux-gkeop Ubuntu 20.04 LTS 5.4.0-1078.82

ubuntu advisories UBUNTU-CVE-2021-4001

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel-syms SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +6 more 5.3.18-24.99.1
  • kernel-source SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +6 more 5.3.18-24.99.1
  • kernel-default SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +9 more 5.3.18-24.99.1
  • kernel-preempt SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +6 more 5.3.18-24.99.1
  • kernel-obs-build SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLE High Performance Computing 15 SP2-LTSS +3 more 5.3.18-24.99.1
  • kernel-default-base SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +7 more 5.3.18-24.99.1.9.46.1
  • kernel-rt SLE Micro 5.0, Real Time Module 15 SP2 5.3.18-65.2
  • kernel-syms-rt Real Time Module 15 SP2 5.3.18-65.1

suse advisories SUSE-SU-2022:0984-1SUSE-SU-2022:0978-1SUSE-SU-2022:0197-1SUSE-SU-2022:0181-1SUSE-SU-2022:0131-1SUSE-SU-2022:0079-1

  • dtb-aarch64 openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-64kb openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-syms openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-obs-qa openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-source openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-default openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-preempt openSUSE Leap 15.3 5.3.18-59.40.1
  • kernel-kvmsmall openSUSE Leap 15.3 5.3.18-59.40.1

opensuse advisories openSUSE-SU-2022:0131-1openSUSE-SU-2022:0056-1

  • linux-hardened Arch Linux 5.15.5.hardened1-1
  • linux Arch Linux 5.15.5.arch1-1
  • linux-zen Arch Linux 5.15.5.zen1-1
  • linux-lts Arch Linux 5.10.83-1

arch linux advisories AVG-2524AVG-2585AVG-2586AVG-2595

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-4001 updated cvss 6.7

kernel: race condition when the EBPF map is frozen

  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more
    affected: workaround, no fix available
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +82 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
31 d ago

Exploit prediction

0.19% chance of exploitation in the next 30 days, higher than 8% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 4.1 CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N
NVD 2.0 4.7 AV:L/AC:M/Au:N/C:N/I:C/A:N

Affected products

  • n/a kernel

Classification

Weakness
  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.