Skip to content
Fencer Intel
medium 4.4

CVE-2021-4002 json

A memory leak flaw in the Linux kernel's hugetlbfs memory usage was found in the way the user maps some regions of memory twice using shmge…

published 4y ago modified 4mo ago also EUVD-2021-33909

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

Summary

A memory leak flaw in the Linux kernel's hugetlbfs memory usage was found in the way the user maps some regions of memory twice using shmget() which are aligned to PUD alignment with the fault of some of the memory pages. A local user could use this flaw to get unauthorized access to some data.

Patch / fix

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

debian advisories DEBIAN-CVE-2021-4002

  • linux Ubuntu 18.04 LTS 4.15.0-166.174
  • linux Ubuntu 20.04 LTS 5.4.0-92.103
  • linux-aws Ubuntu 18.04 LTS 4.15.0-1118.125
  • linux-aws Ubuntu 20.04 LTS 5.4.0-1061.64
  • linux-gcp Ubuntu 20.04 LTS 5.4.0-1059.63
  • linux-gke Ubuntu 20.04 LTS 5.4.0-1057.60
  • linux-ibm Ubuntu 20.04 LTS 5.4.0-1010.11
  • linux-kvm Ubuntu 18.04 LTS 4.15.0-1105.107

ubuntu advisories UBUNTU-CVE-2021-4002

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 RHEL 8 4.18.0-372.9.1.el8
  • perf RHEL 8 4.18.0-372.9.1.el8
  • bpftool RHEL 8 4.18.0-372.9.1.el8
  • kernel-core RHEL 8 4.18.0-372.9.1.el8
  • kernel-tools RHEL 8 4.18.0-372.9.1.el8
  • python3-perf RHEL 8 4.18.0-372.9.1.el8
  • kernel-modules RHEL 8 4.18.0-372.9.1.el8
  • kernel-zfcpdump RHEL 8 4.18.0-372.9.1.el8

red hat advisories RHSA-2022:1988RHSA-2022:1975

  • kernel-syms SLES 12 SP2-BCL 4.4.121-92.164.1
  • kernel-source SLES 12 SP2-BCL 4.4.121-92.164.1
  • kernel-default SLES 12 SP2-BCL 4.4.121-92.164.1
  • kernel-syms SLES for SAP 12 SP4, SLES 12 SP4-LTSS, OpenStack Cloud Crowbar 9 +1 more 4.12.14-95.88.1
  • kernel-source SLES for SAP 12 SP4, SLES 12 SP4-LTSS, OpenStack Cloud Crowbar 9 +1 more 4.12.14-95.88.1
  • kernel-default SLES for SAP 12 SP4, SLES 12 SP4-LTSS, SLE Live Patching 12 SP4 +3 more 4.12.14-95.88.1
  • kernel-syms SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 4.12.14-150.83.1
  • kernel-source SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 4.12.14-150.83.1

suse advisories SUSE-SU-2022:0477-1SUSE-SU-2022:0371-1SUSE-SU-2022:0367-1SUSE-SU-2022:0366-1SUSE-SU-2022:0362-1SUSE-SU-2022:0197-1

  • kernel-default openSUSE Leap 15.3 4.12.14-197.105.1
  • kernel-vanilla openSUSE Leap 15.3 4.12.14-197.105.1
  • kernel-kvmsmall openSUSE Leap 15.3 4.12.14-197.105.1
  • kernel-zfcpdump openSUSE Leap 15.3 4.12.14-197.105.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

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

  • kernel AlmaLinux 8 4.18.0-372.9.1.el8
  • perf AlmaLinux 8 4.18.0-372.9.1.el8
  • bpftool AlmaLinux 8 4.18.0-372.9.1.el8
  • kernel-core AlmaLinux 8 4.18.0-372.9.1.el8
  • kernel-tools AlmaLinux 8 4.18.0-372.9.1.el8
  • python3-perf AlmaLinux 8 4.18.0-372.9.1.el8
  • kernel-modules AlmaLinux 8 4.18.0-372.9.1.el8
  • kernel-debug-core AlmaLinux 8 4.18.0-372.9.1.el8

almalinux advisories ALSA-2022:1988

  • kernel Rocky Linux 8 4.18.0-372.9.1.el8
  • kernel-rt Rocky Linux 8 4.18.0-372.9.1.rt7.166.el8

rocky linux advisories RLSA-2022:1988RLSA-2022:1975

  • kernel CBL-Mariner 2.0 5.15.32.1-2

azure linux advisories AZL-8995

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

  • 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.82-1

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

Is CVE-2021-4002 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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-4002 updated cvss 5.1

kernel: possible leak or coruption of data residing on hugetlbfs

  • Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, kernel-alt, python-perf, +9 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-372.9.1.el8, kernel 4.18.0-372.9.1.el8, bpftool 4.18.0-372.9.1.el8, kernel-core 4.18.0-372.9.1.el8, kernel-tools 4.18.0-372.9.1.el8, python3-perf 4.18.0-372.9.1.el8, +15 more Red Hat Enterprise Linux CRB (v. 8) kernel-debuginfo-common-x86_64 4.18.0-372.9.1.el8, kernel-debuginfo-common-aarch64 4.18.0-372.9.1.el8, kernel-debuginfo-common-ppc64le 4.18.0-372.9.1.el8
    fixed: vendor fix RHSA-2022:1988
  • Red Hat Enterprise Linux NFV (v. 8) kernel-rt 4.18.0-372.9.1.rt7.166.el8, kernel-rt-kvm 4.18.0-372.9.1.rt7.166.el8, kernel-rt-core 4.18.0-372.9.1.rt7.166.el8, kernel-rt-modules 4.18.0-372.9.1.rt7.166.el8, kernel-rt-debug-kvm 4.18.0-372.9.1.rt7.166.el8, kernel-rt-debug-core 4.18.0-372.9.1.rt7.166.el8, +4 more Red Hat Enterprise Linux RT (v. 8) kernel-rt 4.18.0-372.9.1.rt7.166.el8, kernel-rt-core 4.18.0-372.9.1.rt7.166.el8, kernel-rt-modules 4.18.0-372.9.1.rt7.166.el8, kernel-rt-debug-core 4.18.0-372.9.1.rt7.166.el8, kernel-rt-debug-modules 4.18.0-372.9.1.rt7.166.el8, kernel-rt-modules-extra 4.18.0-372.9.1.rt7.166.el8, +2 more
    fixed: vendor fix RHSA-2022:1975
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 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

Exploit prediction

0.52% chance of exploitation in the next 30 days, higher than 44% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • openwall.com https://www.openwall.com/lists/oss-security/2021/11/25/1 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 4.4 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
NVD 2.0 3.6 AV:L/AC:L/Au:N/C:P/I:P/A:N

Affected products

  • n/a kernel

Classification

Weakness
  • CWE-459 Incomplete Cleanup
  • CWE-401 Missing Release of Memory after Effective Lifetime
Technology feeds

References

Sources

Fencer Intel 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.