# CVE-2024-42318: landlock: Don't lose track of restrictions on cred_transfer

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2024-08-17T09:09:31.160Z
- Modified: 2026-08-05T11:36:37.407Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 before 916c648323fa53b89eedb34a0988ddaf01406117; from 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 before 0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c; from 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 before 16896914bace82d7811c62f3b6d5320132384f49; from 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 before b14cc2cf313bd29056fadbc8ecd7f957cf5791ff; from 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 before 39705a6c29f8a2b93cf5b99528a55366c50014d1; 5.13 (not affected: before 5.13; from 5.15.165 up to 5.15.*; from 6.1.103 up to 6.1.*; from 6.6.44 up to 6.6.*; from 6.10.3 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: from 5.13 before 5.15.165; from 5.16 before 6.1.103; from 6.2 before 6.6.44; from 6.7 before 6.10.3

## Every score

- Linux: CVSS:3.1 8.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/916c648323fa53b89eedb34a0988ddaf01406117> (patch)
- <https://git.kernel.org/stable/c/0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c> (patch)
- <https://git.kernel.org/stable/c/16896914bace82d7811c62f3b6d5320132384f49> (patch)
- <https://git.kernel.org/stable/c/b14cc2cf313bd29056fadbc8ecd7f957cf5791ff> (patch)
- <https://git.kernel.org/stable/c/39705a6c29f8a2b93cf5b99528a55366c50014d1> (patch)
- <https://lore.kernel.org/all/20240817.shahka3Ee1iy@digikod.net/> (mailing-list)
- <https://www.openwall.com/lists/oss-security/2024/08/17/2> (mailing-list)
- <https://bugs.chromium.org/p/project-zero/issues/detail?id=2566> (issue-tracking, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/08/17/2> (mailing-list)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-42318](https://www.cve.org/CVERecord?id=CVE-2024-42318), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-42318](https://nvd.nist.gov/vuln/detail/CVE-2024-42318), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-42318 · Whole record: https://cve.day/CVE-2024-42318.json · Rebuilt by cve.day 2026-11-25T22:58:44.483Z
