CVE-2024-50182 json
secretmem: disable memfd_secret() if arch cannot set direct map
published 2024-11-08 2 y ago modified 2026-08-05 3 mo ago also EUVD-2024-44684
- cvss
- 7.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 14%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
secretmem: disable memfd_secret() if arch cannot set direct map
Return -ENOSYS from memfd_secret() syscall if !can_set_direct_map(). This is the case for example on some arm64 configurations, where marking 4k PTEs in the direct map not present can only be done if the direct map is set up at 4k granularity in the first place (as ARM's break-before-make semantics do not easily allow breaking apart large/gigantic pages).
More precisely, on arm64 systems with !can_set_direct_map(), set_direct_map_invalid_noflush() is a no-op, however it returns success (0) instead of an error. This means that memfd_secret will seemingly "work" (e.g. syscall succeeds, you can mmap the fd and fault in pages), but it does not actually achieve its goal of removing its memory from the direct map.
Note that with this patch, memfd_secret() will start erroring on systems where can_set_direct_map() returns false (arm64 with CONFIG_RODATA_FULL_DEFAULT_ENABLED=n, CONFIG_DEBUG_PAGEALLOC=n and CONFIG_KFENCE=n), but that still seems better than the current silent failure. Since CONFIG_RODATA_FULL_DEFAULT_ENABLED defaults to 'y', most arm64 systems actually have a working memfd_secret() and aren't be affected.
From going through the iterations of the original memfd_secret patch series, it seems that disabling the syscall in these scenarios was the intended behavior [1] (preferred over having set_direct_map_invalid_noflush return an error as that would result in SIGBUSes at page-fault time), however the check for it got dropped between v16 [2] and v17 [3], when secretmem moved away from CMA allocations.
[1]: https://lore.kernel.org/lkml/20201124164930.GK8537@kernel.org/ [2]: https://lore.kernel.org/lkml/20210121122723.3446-11-rppt@kernel.org/#t [3]: https://lore.kernel.org/lkml/20201125092208.12544-10-rppt@kernel.org/
Patch / fix
- Linux Linux 5.15.169, 6.1.113, 6.6.57, 6.11.4, 6.12
- linux Debian 12 6.1.115-1
- linux Debian 14, Debian 13 6.11.4-1
debian advisories DEBIAN-CVE-2024-50182
- linux Ubuntu 22.04 LTS 5.15.0-133.144
- linux Ubuntu 24.04 LTS 6.8.0-56.58
- linux-aws Ubuntu 22.04 LTS 5.15.0-1078.85
- linux-aws Ubuntu 24.04 LTS 6.8.0-1025.27
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1077.86
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1026.28
- linux-gke Ubuntu 22.04 LTS 5.15.0-1075.81
- linux-gke Ubuntu 24.04 LTS 6.8.0-1021.25
ubuntu advisories UBUNTU-CVE-2024-50182
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 9 5.14.0-570.12.1.el9_6
- rv RHEL 9 5.14.0-570.12.1.el9_6
- perf RHEL 9 5.14.0-570.12.1.el9_6
- rtla RHEL 9 5.14.0-570.12.1.el9_6
- libperf RHEL 9 5.14.0-570.12.1.el9_6
- kernel-rt RHEL 9 5.14.0-570.12.1.el9_6
- kernel-64k RHEL 9 5.14.0-570.12.1.el9_6
- kernel-core RHEL 9 5.14.0-570.12.1.el9_6
red hat advisories RHSA-2025:6966
- kernel-source Linux Micro 6.1, Linux Micro 6.0 6.4.0-24.1
- kernel-default Linux Micro 6.1, Linux Micro 6.0 6.4.0-24.1
- kernel-kvmsmall Linux Micro 6.1, Linux Micro 6.0 6.4.0-24.1
- kernel-default-base Linux Micro 6.1, Linux Micro 6.0 6.4.0-24.1.21.4
- kernel-livepatch-MICRO-6-0_Update_4 Linux Micro 6.1, Linux Micro 6.0 1-1.2
- kernel-rt Linux Micro 6.1, Linux Micro 6.0 6.4.0-22.1
- kernel-source-rt Linux Micro 6.1, Linux Micro 6.0 6.4.0-22.1
- kernel-livepatch-MICRO-6-0-RT_Update_4 Linux Micro 6.1, Linux Micro 6.0 1-1.1
suse advisories SUSE-SU-2025:20164-1SUSE-SU-2025:20247-1SUSE-SU-2025:20163-1SUSE-SU-2025:20246-1SUSE-SU-2024:4387-1SUSE-SU-2024:4376-1
- kernel-source-longterm openSUSE Tumbleweed 6.12.11-1.1
- kernel-source openSUSE Tumbleweed 6.11.8-1.1
opensuse advisories openSUSE-SU-2025:14705-1openSUSE-SU-2024:14500-1
- git.kernel.org/stable/c/d0ae6ffa1aeb297aef89f49cfb894a83c329ebad commit
- git.kernel.org/stable/c/5ea0b7af38754d2b45ead9257bca47e84662e926 commit
- git.kernel.org/stable/c/7caf966390e6e4ebf42775df54e7ee1f280ce677 commit
- git.kernel.org/stable/c/757786abe4547eb3d9d0e8350a63bdb0f9824af2 commit
- git.kernel.org/stable/c/532b53cebe58f34ce1c0f34d866f5c0e335c53c6 commit
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-2024-50182 updated cvss 5.5
kernel: secretmem: disable memfd_secret() if arch cannot set direct map
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-570.12.1.el9_6, perf 5.14.0-570.12.1.el9_6, rtla 5.14.0-570.12.1.el9_6, python3-perf 5.14.0-570.12.1.el9_6, kernel-devel-matched 5.14.0-570.12.1.el9_6, kernel-64k-devel-matched 5.14.0-570.12.1.el9_6, +7 more Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-570.12.1.el9_6, kernel-64k 5.14.0-570.12.1.el9_6, kernel-core 5.14.0-570.12.1.el9_6, kernel-tools 5.14.0-570.12.1.el9_6, kernel-modules 5.14.0-570.12.1.el9_6, kernel-64k-core 5.14.0-570.12.1.el9_6, +27 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-s390x 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-x86_64 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-aarch64 5.14.0-570.12.1.el9_6, kernel-debuginfo-common-ppc64le 5.14.0-570.12.1.el9_6 Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-570.12.1.el9_6, kernel-rt-64k 5.14.0-570.12.1.el9_6, kernel-rt-core 5.14.0-570.12.1.el9_6, kernel-rt-modules 5.14.0-570.12.1.el9_6, kernel-rt-64k-core 5.14.0-570.12.1.el9_6, kernel-rt-debug-core 5.14.0-570.12.1.el9_6, +14 more Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-570.12.1.el9_6, kernel-rt-kvm 5.14.0-570.12.1.el9_6, kernel-rt-core 5.14.0-570.12.1.el9_6, kernel-rt-modules 5.14.0-570.12.1.el9_6, kernel-rt-debug-kvm 5.14.0-570.12.1.el9_6, kernel-rt-debug-core 5.14.0-570.12.1.el9_6, +6 morefixed: vendor fix RHSA-2025:6966
-
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 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 morenot 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
- 13 mo ago
Exploit prediction
0.23% chance of exploitation in the next 30 days, higher than 14% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| CISA ADP | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
-
git.kernel.org
/stable/c/d0ae6ffa1aeb297aef89f49cfb894a83c329ebad
patch
-
git.kernel.org
/stable/c/5ea0b7af38754d2b45ead9257bca47e84662e926
patch
-
git.kernel.org
/stable/c/7caf966390e6e4ebf42775df54e7ee1f280ce677
patch
-
git.kernel.org
/stable/c/757786abe4547eb3d9d0e8350a63bdb0f9824af2
patch
-
git.kernel.org
/stable/c/532b53cebe58f34ce1c0f34d866f5c0e335c53c6
patch
- lists.debian.org /debian-lts-announce/2025/01/msg00001.html
Sources
- CVE List CVE-2024-50182
- NVD CVE-2024-50182
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.