{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-50186", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-10-21T19:36:19.967Z", "datePublished": "2024-11-08T05:38:27.272Z", "dateUpdated": "2026-08-05T11:42:21.793Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:42:21.793Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: explicitly clear the sk pointer, when pf->create fails\n\nWe have recently noticed the exact same KASAN splat as in commit\n6cd4a78d962b (\"net: do not leave a dangling sk pointer, when socket\ncreation fails\"). The problem is that commit did not fully address the\nproblem, as some pf->create implementations do not use sk_common_release\nin their error paths.\n\nFor example, we can use the same reproducer as in the above commit, but\nchanging ping to arping. arping uses AF_PACKET socket and if packet_create\nfails, it will just sk_free the allocated sk object.\n\nWhile we could chase all the pf->create implementations and make sure they\nNULL the freed sk object on error from the socket, we can't guarantee\nfuture protocols will not make the same mistake.\n\nSo it is easier to just explicitly NULL the sk pointer upon return from\npf->create in __sock_create. We do know that pf->create always releases the\nallocated sk object on error, so if the pointer is not NULL, it is\ndefinitely dangling." } ], "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 dangling `sock->sk` is created by a local `socket(2)` syscall that fails inside `pf->create()`; there is no remote or adjacent-network trigger since the failing socket is never bound or exposed to a peer.\nAC:L - The attacker deterministically produces the dangling pointer with a single syscall — `socket(AF_VSOCK, SOCK_DGRAM, 0)` always fails with -ENODEV on any host without the VMCI transport, and `AF_PACKET` fails identically — with no race to win and no memory-layout precondition; on the realistic target deployment (cloud/container hosts running eBPF observability agents hooked on `__sock_release`) the freed object is dereferenced on every attempt.\nPR:L - Any unprivileged local user can call `socket()`; the AF_VSOCK path has no capability check at all, and the AF_PACKET path's `ns_capable(net->user_ns, CAP_NET_RAW)` is trivially satisfied inside an unprivileged user namespace via `unshare -Urn`.\nUI:N - The attacker triggers the entire sequence from its own process with one failing `socket()` call; no victim action is needed.\nS:U - The freed `struct sock` and the corrupting access both live in the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - This is a slab use-after-free: `__sock_gen_cookie()` reads 8 bytes from the freed `struct sock`, and because the attacker can reallocate that slab object with controlled content between the free and the read, the stale value returned to userspace-visible tracing output constitutes an arbitrary kernel heap read primitive.\nI:H - The same path performs `atomic64_cmpxchg(&sk->sk_cookie, ...)`, an 8-byte write into the freed object at a fixed offset, corrupting whatever structure was reallocated there — a classic heap-spray write primitive leveragable toward control-flow hijack.\nA:H - The use-after-free reliably produces a KASAN slab-use-after-free splat and can panic the kernel outright when the freed slab page has been returned to the page allocator or when the corrupted victim object contains a pointer that is later dereferenced." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "net/socket.c" ], "versions": [ { "version": "78e4aa528a7b1204219d808310524344f627d069", "lessThan": "daf462ff3cde6ecf22b98d9ae770232c10d28de2", "status": "affected", "versionType": "git" }, { "version": "893eeba94c40d513cd0fe6539330ebdaea208c0e", "lessThan": "b7d22a79ff4e962b8af5ffe623abd1d6c179eb9f", "status": "affected", "versionType": "git" }, { "version": "454c454ed645fed051216b79622f7cb69c1638f5", "lessThan": "563e6892e21d6ecabdf62103fc4e7b326d212334", "status": "affected", "versionType": "git" }, { "version": "6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2", "lessThan": "8e1b72fd74bf9da3b099d09857f4e7f114f38e12", "status": "affected", "versionType": "git" }, { "version": "6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2", "lessThan": "631083143315d1b192bd7d915b967b37819e88ea", "status": "affected", "versionType": "git" }, { "version": "5dfe2408fd7dc4d2e7ac38a116ff0a37b1cfd3b9", "status": "affected", "versionType": "git" }, { "version": "5.15.162", "lessThan": "5.15.168", "status": "affected", "versionType": "semver" }, { "version": "6.1.96", "lessThan": "6.1.113", "status": "affected", "versionType": "semver" }, { "version": "6.6.36", "lessThan": "6.6.57", "status": "affected", "versionType": "semver" }, { "version": "6.9.7", "lessThan": "6.10", "status": "affected", "versionType": "semver" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "net/socket.c" ], "versions": [ { "version": "6.10", "status": "affected" }, { "version": "0", "lessThan": "6.10", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.168", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.113", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.57", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.11.4", "lessThanOrEqual": "6.11.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12", "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": "5.15.162", "versionEndExcluding": "5.15.168" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1.96", "versionEndExcluding": "6.1.113" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.6.36", "versionEndExcluding": "6.6.57" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.10", "versionEndExcluding": "6.11.4" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.10", "versionEndExcluding": "6.12" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.9.7" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/daf462ff3cde6ecf22b98d9ae770232c10d28de2" }, { "url": "https://git.kernel.org/stable/c/b7d22a79ff4e962b8af5ffe623abd1d6c179eb9f" }, { "url": "https://git.kernel.org/stable/c/563e6892e21d6ecabdf62103fc4e7b326d212334" }, { "url": "https://git.kernel.org/stable/c/8e1b72fd74bf9da3b099d09857f4e7f114f38e12" }, { "url": "https://git.kernel.org/stable/c/631083143315d1b192bd7d915b967b37819e88ea" } ], "title": "net: explicitly clear the sk pointer, when pf->create fails", "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-50186", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "total" } ], "version": "2.0.3", "timestamp": "2025-10-01T20:18:35.923854Z" } } } ], "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-10-01T20:27:09.127Z" } }, { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T22:26:38.814Z" } } ] } }