# CVE-2024-50182: secretmem: disable memfd\_secret() if arch cannot set direct map

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-26)
- **Published:** 2024-11-08T05:38:23.528Z
- **Modified:** 2026-08-05T11:42:19.645Z

## Who should check

- Anyone running Linux \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< d0ae6ffa1aeb297aef89f49cfb894a83c329ebad; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 5ea0b7af38754d2b45ead9257bca47e84662e926; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 7caf966390e6e4ebf42775df54e7ee1f280ce677; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 757786abe4547eb3d9d0e8350a63bdb0f9824af2; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 532b53cebe58f34ce1c0f34d866f5c0e335c53c6
- Anyone running Linux 5.14

## Description

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/

## Affected and fixed versions

- Linux: \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< d0ae6ffa1aeb297aef89f49cfb894a83c329ebad; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 5ea0b7af38754d2b45ead9257bca47e84662e926; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 7caf966390e6e4ebf42775df54e7ee1f280ce677; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 757786abe4547eb3d9d0e8350a63bdb0f9824af2; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 532b53cebe58f34ce1c0f34d866f5c0e335c53c6 (cvelist)
- Linux: 5.14 (cvelist)

## Mitigation

- Upgrade Linux to 532b53cebe58f34ce1c0f34d866f5c0e335c53c6 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-50182. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50182.md
Affected: Linux >= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < d0ae6ffa1aeb297aef89f49cfb894a83c329ebad; >= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 5ea0b7af38754d2b45ead9257bca47e84662e926; >= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 7caf966390e6e4ebf42775df54e7ee1f280ce677; >= 1507f51255c9ff07d75909a…
Fixed in: Linux 5ea0b7af38754d2b45ead9257bca47e84662e926, Linux 7caf966390e6e4ebf42775df54e7ee1f280ce677, Linux 757786abe4547eb3d9d0e8350a63bdb0f9824af2, Linux 532b53cebe58f34ce1c0f34d866f5c0e335c53c6

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-50182 being exploited?

There is no confirmed exploitation: CVE-2024-50182 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-50182?

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-50182?

Linux \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< d0ae6ffa1aeb297aef89f49cfb894a83c329ebad; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 5ea0b7af38754d2b45ead9257bca47e84662e926; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 7caf966390e6e4ebf42775df54e7ee1f280ce677; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 757786abe4547eb3d9d0e8350a63bdb0f9824af2; \>= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, \< 532b53cebe58f34ce1c0f34d866f5c0e335c53c6; Linux 5.14.

### Is there a fix for CVE-2024-50182?

Yes. Fixed in Linux 5ea0b7af38754d2b45ead9257bca47e84662e926, Linux 7caf966390e6e4ebf42775df54e7ee1f280ce677, Linux 757786abe4547eb3d9d0e8350a63bdb0f9824af2, Linux 532b53cebe58f34ce1c0f34d866f5c0e335c53c6. Upgrade Linux to 532b53cebe58f34ce1c0f34d866f5c0e335c53c6 or later.

### How do I check if I'm affected by CVE-2024-50182?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d0ae6ffa1aeb297aef89f49cfb894a83c329ebad>
- patch: <https://git.kernel.org/stable/c/5ea0b7af38754d2b45ead9257bca47e84662e926>
- patch: <https://git.kernel.org/stable/c/7caf966390e6e4ebf42775df54e7ee1f280ce677>
- patch: <https://git.kernel.org/stable/c/757786abe4547eb3d9d0e8350a63bdb0f9824af2>
- patch: <https://git.kernel.org/stable/c/532b53cebe58f34ce1c0f34d866f5c0e335c53c6>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-50182>

HTML: <https://flawdb.com/CVE-2024-50182> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-50182>
