CVE Catalog

CVE-2024-42318

HighCVSS 8.8
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.29%

21th percentile - higher than 21% of all known CVEs

Summary

In the Linux kernel, in the Landlock module, a vulnerability was found that loses track of restrictions on cred_transfer. When a process' cred struct is replaced, it almost always invokes the cred_prepare LSM hook, but in one special case (KEYCTL_SESSION_TO_PARENT) the cred_transfer hook is used instead. Landlock only implements cred_prepare, so KEYCTL_SESSION_TO_PARENT causes all Landlock restriction information to be lost. The fix adds a cred_transfer hook that does the same as cred_prepare.

Risk Assessment

A process with the ability to use fork() and keyctl() syscalls can get rid of all Landlock restrictions on itself, potentially leading to security policy bypass and privilege escalation.

Recommendation

It is recommended to update the Linux kernel to a patched version. Also, restrict access to keyctl() syscalls for unprivileged processes.

Other vulnerabilities in Linux kernel

See all
Original NVD description (English source)

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.)

Vulnerability data from NVD (NIST) · CISA KEV · EPSS