CVE-2024-42318
landlock: Don't lose track of restrictions on cred_transfer
Mitigation
- Upgrade Linux to 39705a6c29f8a2b93cf5b99528a55366c50014d1 or later.
Who should check
- Anyone running Linux >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 916c648323fa53b89eedb34a0988ddaf01406117; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 16896914bace82d7811c62f3b6d5320132384f49; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < b14cc2cf313bd29056fadbc8ecd7f957cf5791ff; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 39705a6c29f8a2b93cf5b99528a55366c50014d1
- Anyone running Linux 5.13
Vulnerability facts
- Affected
- Linux >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 916c648323fa53b89eedb34a0988ddaf01406117; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 16896914bace82d7811c62f3b6d5320132384f49; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < b14cc2cf313bd29056fadbc8ecd7f957cf5791ff; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 39705a6c29f8a2b93cf5b99528a55366c50014d1; Linux 5.13
- Fixed in
- Linux 916c648323fa53b89eedb34a0988ddaf01406117, Linux 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c, Linux 16896914bace82d7811c62f3b6d5320132384f49, Linux 39705a6c29f8a2b93cf5b99528a55366c50014d1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.35% chance of exploitation in 30 days (percentile 21, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: landlock: Don't lose track of restrictions on cred_transfer When a process' cred struct is replaced, this _almost_ always invokes the cred_prepare LSM hook; but in one special case (when KEYCTL_SESSION_TO_PARENT updates the parent's credentials), the cred_transfer LSM hook is used instead. Landlock only implements the cred_prepare hook, not cred_transfer, so KEYCTL_SESSION_TO_PARENT causes all information on Landlock restrictions to be lost. This basically means that a process with the ability to use the fork() and keyctl() syscalls can get rid of all Landlock restrictions on itself. Fix it by adding a cred_transfer hook that does the same thing as the existing cred_prepare hook. (Implemented by having hook_cred_prepare() call hook_cred_transfer() so that the two functions are less likely to accidentally diverge in the future.)
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 916c648323fa53b89eedb34a0988ddaf01406117; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 16896914bace82d7811c62f3b6d5320132384f49; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < b14cc2cf313bd29056fadbc8ecd7f957cf5791ff; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 39705a6c29f8a2b93cf5b99528a55366c50014d1 | — | cvelist |
| Linux | 5.13 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-42318. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-42318.md Affected: Linux >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 916c648323fa53b89eedb34a0988ddaf01406117; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 16896914bace82d7811c62f3b6d5320132384f49; >= 385975dca53eb41031d0cbd… Fixed in: Linux 916c648323fa53b89eedb34a0988ddaf01406117, Linux 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c, Linux 16896914bace82d7811c62f3b6d5320132384f49, Linux 39705a6c29f8a2b93cf5b99528a55366c50014d1 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.
References
Patches
- https://git.kernel.org/stable/c/916c648323fa53b89eedb34a0988ddaf01406117
- https://git.kernel.org/stable/c/0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c
- https://git.kernel.org/stable/c/16896914bace82d7811c62f3b6d5320132384f49
- https://git.kernel.org/stable/c/b14cc2cf313bd29056fadbc8ecd7f957cf5791ff
- https://git.kernel.org/stable/c/39705a6c29f8a2b93cf5b99528a55366c50014d1
Other
- https://lore.kernel.org/all/20240817.shahka3Ee1iy@digikod.net/
- https://www.openwall.com/lists/oss-security/2024/08/17/2
- https://bugs.chromium.org/p/project-zero/issues/detail?id=2566
- http://www.openwall.com/lists/oss-security/2024/08/17/2
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
FAQ
Is CVE-2024-42318 being exploited?
There is no confirmed exploitation: CVE-2024-42318 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-42318?
High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-42318?
Linux >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 916c648323fa53b89eedb34a0988ddaf01406117; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 16896914bace82d7811c62f3b6d5320132384f49; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < b14cc2cf313bd29056fadbc8ecd7f957cf5791ff; >= 385975dca53eb41031d0cbd1de318eb1bc5d6bb9, < 39705a6c29f8a2b93cf5b99528a55366c50014d1; Linux 5.13.
Is there a fix for CVE-2024-42318?
Yes. Fixed in Linux 916c648323fa53b89eedb34a0988ddaf01406117, Linux 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c, Linux 16896914bace82d7811c62f3b6d5320132384f49, Linux 39705a6c29f8a2b93cf5b99528a55366c50014d1. Upgrade Linux to 39705a6c29f8a2b93cf5b99528a55366c50014d1 or later.
How do I check if I'm affected by CVE-2024-42318?
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.