CVE-2024-42318

landlock: Don't lose track of restrictions on cred_transfer

MEDIUM
5.5
CVSS Score
Published: August 17, 2024 at 09:09 AM UTC
Updated: August 5, 2026 at 12:04 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.13 ≤ v < 5.15.1655.13 ≤ v < 6.1.1035.13 ≤ v < 6.10.35.13 ≤ v < 6.115.13 ≤ v < 6.6.445.16 ≤ v < 6.1.1036.2 ≤ v < 6.6.446.7 ≤ v < 6.10.3385975dca53eb41031d0cbd1de318eb1bc5d6bb95.13
Vendor states this is fixed in 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c (fixed)
Vendor states this is fixed in 16896914bace82d7811c62f3b6d5320132384f49 (fixed)
Vendor states this is fixed in 39705a6c29f8a2b93cf5b99528a55366c50014d1 (fixed)
Vendor states this is fixed in 916c648323fa53b89eedb34a0988ddaf01406117 (fixed)
Vendor states this is fixed in b14cc2cf313bd29056fadbc8ecd7f957cf5791ff (fixed)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.15.165 (unaffected)
Vendor states this is fixed in 6.1.103 (unaffected)
Vendor states this is fixed in 6.10.3 (unaffected)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.6.44 (unaffected)

References (10)

Issue TrackingThird Party Advisory
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://bugs.chromium.org/p/project-zero/issues/detail?id=2566
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/16896914bace82d7811c62f3b6d5320132384f49
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/39705a6c29f8a2b93cf5b99528a55366c50014d1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/916c648323fa53b89eedb34a0988ddaf01406117
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b14cc2cf313bd29056fadbc8ecd7f957cf5791ff
Mailing List
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://lore.kernel.org/all/[email protected]/
Mailing List
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://www.openwall.com/lists/oss-security/2024/08/17/2

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card