{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-42318","id":"CVE-2024-42318","title":"landlock: Don't lose track of restrictions on cred_transfer","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nlandlock: Don't lose track of restrictions on cred_transfer\n\nWhen a process' cred struct is replaced, this _almost_ always invokes\nthe cred_prepare LSM hook; but in one special case (when\nKEYCTL_SESSION_TO_PARENT updates the parent's credentials), the\ncred_transfer LSM hook is used instead.  Landlock only implements the\ncred_prep","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nlandlock: Don't lose track of restrictions on cred_transfer\n\nWhen a process' cred struct is replaced, this _almost_ always invokes\nthe cred_prepare LSM hook; but in one special case (when\nKEYCTL_SESSION_TO_PARENT updates the parent's credentials), the\ncred_transfer LSM hook is used instead.  Landlock only implements the\ncred_prepare hook, not cred_transfer, so KEYCTL_SESSION_TO_PARENT causes\nall information on Landlock restrictions to be lost.\n\nThis basically means that a process with the ability to use the fork()\nand keyctl() syscalls can get rid of all Landlock restrictions on\nitself.\n\nFix it by adding a cred_transfer hook that does the same thing as the\nexisting cred_prepare hook. (Implemented by having hook_cred_prepare()\ncall hook_cred_transfer() so that the two functions are less likely to\naccidentally diverge in the future.)","published":"2024-08-17T09:09:31.160Z","updated":"2026-10-28T02:30:56.143869216Z","reserved":"2024-07-30T07:40:12.278Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","lessThan":"916c648323fa53b89eedb34a0988ddaf01406117","status":"affected","versionType":"git"},{"version":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","lessThan":"0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c","status":"affected","versionType":"git"},{"version":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","lessThan":"16896914bace82d7811c62f3b6d5320132384f49","status":"affected","versionType":"git"},{"version":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","lessThan":"b14cc2cf313bd29056fadbc8ecd7f957cf5791ff","status":"affected","versionType":"git"},{"version":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","lessThan":"39705a6c29f8a2b93cf5b99528a55366c50014d1","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","lessThan":"5.13","status":"unaffected","versionType":"semver"},{"version":"5.15.165","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.103","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.44","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.10.3","lessThanOrEqual":"6.10.*","status":"unaffected","versionType":"semver"},{"version":"6.11","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/916c648323fa53b89eedb34a0988ddaf01406117","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/16896914bace82d7811c62f3b6d5320132384f49","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/b14cc2cf313bd29056fadbc8ecd7f957cf5791ff","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/39705a6c29f8a2b93cf5b99528a55366c50014d1","tags":["Patch","web"]},{"url":"https://lore.kernel.org/all/20240817.shahka3Ee1iy@digikod.net/","tags":["Mailing List","web"]},{"url":"https://www.openwall.com/lists/oss-security/2024/08/17/2","tags":["Mailing List","web"]},{"url":"https://bugs.chromium.org/p/project-zero/issues/detail?id=2566","tags":["Issue Tracking","Third Party Advisory","web"]},{"url":"http://www.openwall.com/lists/oss-security/2024/08/17/2","tags":["Mailing List","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42318.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42318","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00297,"epssPercentile":0.22644,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-42318","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42318","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-42318","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-42318","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}