PT-2024-29866 · Linux+5 · Linux Kernel+5

Jann Horn

·

Published

2024-08-17

·

Updated

2025-02-04

·

CVE-2024-42318

CVSS v3.1

5.5

Medium

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions Linux kernel versions prior to 6.6.50
Description The issue arises when a process' cred struct is replaced, typically invoking the cred prepare LSM hook, but in a special case where KEYCTL SESSION TO PARENT updates the parent's credentials, the cred transfer LSM hook is used instead. Since Landlock only implements the cred prepare hook and not the cred transfer hook, this results in the loss of all Landlock restrictions on the process. A process with the ability to use the fork() and keyctl() syscalls can exploit this to bypass Landlock restrictions. The fix involves adding a cred transfer hook that functions similarly to the existing cred prepare hook, implemented by having hook cred prepare() call hook cred transfer() to prevent accidental divergence.
Recommendations To resolve the issue, update to Linux kernel version 6.6.50 or later. As a temporary workaround, consider restricting the use of the fork() and keyctl() syscalls to minimize the risk of exploitation. Additionally, limiting access to the cred transfer hook until a patch is applied can help mitigate the issue.

Exploit

Fix

RCE

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2025-03379
CVE-2024-42318
DLA-4008-1
MGASA-2024-0309
MGASA-2024-0310
OESA-2024-2077
OESA-2024-2078
OESA-2025-1078
OPENSUSE-SU-2024_3190-1
OPENSUSE-SU-2024_3209-1
OPENSUSE-SU-2024_3483-1
SUSE-SU-2024:3190-1
SUSE-SU-2024:3194-1
SUSE-SU-2024:3195-1
SUSE-SU-2024:3209-1
SUSE-SU-2024:3383-1
SUSE-SU-2024:3483-1
SUSE-SU-2025:20044-1
SUSE-SU-2025:20047-1
USN-7100-1
USN-7100-2
USN-7123-1
USN-7144-1
USN-7154-1
USN-7154-2
USN-7155-1
USN-7156-1
USN-7194-1
USN-7196-1

Affected Products

Astra Linux
Linuxmint
Linux Kernel
Red Os
Suse
Ubuntu