{"id":"CVE-2024-42318","aliases":["CVE-2024-42318"],"related":[],"kind":"vulnerability","state":"published","title":"landlock: Don't lose track of restrictions on cred_transfer","summary":"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.)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.)","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: landlock: no pierda de vista las restricciones en cred_transfer Cuando se reemplaza la estructura cred de un proceso, esto _almost_ always invoca el gancho LSM cred_prepare; pero en un caso especial (cuando KEYCTL_SESSION_TO_PARENT actualiza las credenciales de los padres), se utiliza el gancho LSM cred_transfer. Landlock solo implementa el gancho cred_prepare, no cred_transfer, por lo que KEYCTL_SESSION_TO_PARENT hace que se pierda toda la información sobre las restricciones de Landlock. Básicamente, esto significa que un proceso con la capacidad de utilizar las llamadas al sistema fork() y keyctl() puede deshacerse de todas las restricciones de Landlock sobre sí mismo. Solucionelo agregando un gancho cred_transfer que haga lo mismo que el gancho cred_prepare existente. (Se implementa haciendo que hook_cred_prepare() llame a hook_cred_transfer() para que sea menos probable que las dos funciones diverjan accidentalmente en el futuro).","source":"nvd"}],"published":"2024-08-17T09:09:31.160Z","modified":"2026-08-05T11:36:37.407Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","fixed":"916c648323fa53b89eedb34a0988ddaf01406117","status":"affected"},{"type":"git","introduced":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","fixed":"0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c","status":"affected"},{"type":"git","introduced":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","fixed":"16896914bace82d7811c62f3b6d5320132384f49","status":"affected"},{"type":"git","introduced":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","fixed":"b14cc2cf313bd29056fadbc8ecd7f957cf5791ff","status":"affected"},{"type":"git","introduced":"385975dca53eb41031d0cbd1de318eb1bc5d6bb9","fixed":"39705a6c29f8a2b93cf5b99528a55366c50014d1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.13","status":"unaffected"},{"type":"semver","introduced":"5.15.165","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.103","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.44","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.10.3","lastAffected":"6.10.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.11","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.13","fixed":"5.15.165"},{"status":"affected","introduced":"5.16","fixed":"6.1.103"},{"status":"affected","introduced":"6.2","fixed":"6.6.44"},{"status":"affected","introduced":"6.7","fixed":"6.10.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/916c648323fa53b89eedb34a0988ddaf01406117","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0d74fd54db0bd0c0c224bef0da8fc95ea9c9f36c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/16896914bace82d7811c62f3b6d5320132384f49","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b14cc2cf313bd29056fadbc8ecd7f957cf5791ff","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/39705a6c29f8a2b93cf5b99528a55366c50014d1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lore.kernel.org/all/20240817.shahka3Ee1iy@digikod.net/","tags":["mailing-list"],"sources":["cvelist","nvd"]},{"url":"https://www.openwall.com/lists/oss-security/2024/08/17/2","tags":["mailing-list"],"sources":["cvelist","nvd"]},{"url":"https://bugs.chromium.org/p/project-zero/issues/detail?id=2566","tags":["issue-tracking","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2024/08/17/2","tags":["mailing-list"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T16:09:35.795Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-42318","url":"https://www.cve.org/CVERecord?id=CVE-2024-42318","licence":"CVE Terms of Use","modified":"2026-08-05T11:36:37.407Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-42318","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42318","licence":"Public domain","modified":"2026-08-04T11:19:52.137Z"}],"updatedAt":"2026-11-25T22:58:44.483Z","epss":{"score":0.00297,"percentile":0.24039,"date":"2026-12-01T12:00:22.000Z"}}