{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56603","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-12-27T14:03:06.012Z","datePublished":"2024-12-27T14:51:08.923Z","dateUpdated":"2026-08-05T11:45:23.876Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:45:23.876Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: af_can: do not leave a dangling sk pointer in can_create()\n\nOn error can_create() frees the allocated sk object, but sock_init_data()\nhas already attached it to the provided sock object. This will leave a\ndangling sk pointer in the sock object and may cause use-after-free later."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The defect lives in the `socket(AF_CAN, SOCK_RAW, CAN_RAW)` creation path, reached only through a local syscall via `__sock_create()`; no CAN-bus frame or network data reaches `can_create()`. Consistent with the Bluetooth and af_packet siblings in the same series, which were also scored AV:L because the flaw is in socket setup rather than frame processing.\nAC:L - The only failing `->init` is `raw_init()`'s `alloc_percpu(struct uniqframe)` returning `-ENOMEM`, and an unprivileged local attacker can drive the percpu allocator into failure by spraying percpu-consuming objects (including CAN raw sockets themselves) before retrying `socket()` in a tight loop. This is the same attacker-induced-ENOMEM shape as the af_packet sibling CVE-2024-56606, which was scored AC:L.\nPR:L - `can_create()` performs no `capable()` check at all — unlike af_packet there is no `CAP_NET_RAW` gate — and there is no `net_eq(net, &init_net)` restriction, so any unprivileged local user, including inside an unprivileged user namespace, can reach it. Where `CONFIG_CAN` is modular, `MODULE_ALIAS_NETPROTO(PF_CAN)` lets the unprivileged `socket()` call autoload the module itself.\nUI:N - The attacker performs the entire sequence — memory pressure plus repeated `socket()` calls — from its own process. No victim action, mount, or file open is involved.\nS:U - The freed `struct raw_sock`/`struct sock` and the stale `sock->sk` reference both live entirely within the kernel's own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - Per the use-after-free rubric, the stale `sock->sk` pointing at a freed `raw_sock` in the general kmalloc caches lets an attacker reclaim the slab and read back attacker-shaped or leftover kernel data; the demonstrated consumer for this exact bug class (CVE-2024-40954) is a KASAN-confirmed slab-use-after-free *read* of the freed sock via `__sock_gen_cookie()`.\nI:H - The same dangling reference permits heap spraying of the reclaimed slot, giving control over function-pointer-bearing fields of `struct sock` (`sk_prot`, `sk_destruct`, `sk_wq`) and therefore a control-flow-hijack primitive rather than mere data corruption.\nA:H - Any dereference of the freed `sock->sk` before `iput()` faults or corrupts kernel state, producing an oops or panic; the rubric treats all use-after-free conditions as high availability impact even when only partially exploited."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/af_can.c"],"versions":[{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"884ae8bcee749be43a071d6ed2d89058dbd2425c","status":"affected","versionType":"git"},{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"ce39b5576785bb3e66591145aad03d66bc3e778d","status":"affected","versionType":"git"},{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"1fe625f12d090d69f3f084990c7e4c1ff94bfe5f","status":"affected","versionType":"git"},{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"5947c9ac08f0771ea8ed64186b0d52e9029cb6c0","status":"affected","versionType":"git"},{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"db207d19adbac96058685f6257720906ad41d215","status":"affected","versionType":"git"},{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"8df832e6b945e1ba61467d7f1c9305e314ae92fe","status":"affected","versionType":"git"},{"version":"0d66548a10cbbe0ef256852d63d30603f0f73f9b","lessThan":"811a7ca7320c062e15d0f5b171fe6ad8592d1434","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/af_can.c"],"versions":[{"version":"2.6.25","status":"affected"},{"version":"0","lessThan":"2.6.25","status":"unaffected","versionType":"semver"},{"version":"5.4.287","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.231","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.174","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.120","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.66","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.5","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"5.4.287"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"5.10.231"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"5.15.174"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.1.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.6.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.12.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"6.13"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/884ae8bcee749be43a071d6ed2d89058dbd2425c"},{"url":"https://git.kernel.org/stable/c/ce39b5576785bb3e66591145aad03d66bc3e778d"},{"url":"https://git.kernel.org/stable/c/1fe625f12d090d69f3f084990c7e4c1ff94bfe5f"},{"url":"https://git.kernel.org/stable/c/5947c9ac08f0771ea8ed64186b0d52e9029cb6c0"},{"url":"https://git.kernel.org/stable/c/db207d19adbac96058685f6257720906ad41d215"},{"url":"https://git.kernel.org/stable/c/8df832e6b945e1ba61467d7f1c9305e314ae92fe"},{"url":"https://git.kernel.org/stable/c/811a7ca7320c062e15d0f5b171fe6ad8592d1434"}],"title":"net: af_can: do not leave a dangling sk pointer in can_create()","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-56603","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-11T15:42:16.822268Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-416","description":"CWE-416 Use After Free"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-02-11T15:45:23.668Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T20:50:46.640Z"}}]}}