{"id":"CVE-2026-68399","state":"PUBLISHED","title":"bpf: Fix UAF in sock clone early bailouts","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix UAF in sock clone early bailouts\n\nSimilar to recent commit 9b51a6155d14 (\"bpf,fork: wipe ->bpf_storage\nbefore bailouts that access it\"), sk_clone() performs an initial\nshallow copy of the socket field ->sk_bpf_storage via sock_copy()\nfor the cloned socket newsk.\n\nIf sk_clone() bails out early (e.g. if sk_filter_charge() fails) prior\nto calling bpf_sk_storage_clone(), newsk->sk_bpf_storage still points\nto the parent socket's BPF local storage. When newsk is subsequently\nfreed via sk_free(), the deallocation path (__sk_destruct() ->\nbpf_sk_storage_free()) destroys the parent socket's BPF local storage,\nleading to a use-after-free (UAF) on the parent socket.\n\nFix this by resetting newsk->sk_bpf_storage to NULL immediately after\nsock_copy() in sk_clone(), and remove the now redundant initialization\nfrom bpf_sk_storage_clone().","publishedAt":"2026-08-10T12:04:18.837Z","updatedAt":"2026-10-30T12:28:27.786Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"ac855efc6bb216b262b672af68219e5b731f42a4","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"f6814814b3bdd6ecb6bc1fc53ba4e827e0185f01","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"24139461545e44442df9b80deace26b2eb3e103d","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"01f8a354497ba739f81b691b3702bc4c46500a4d","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"14b49b5ab29979552c219a09e569b424fbbf4a6e","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"7cbd0c4cebe4c9f678d15e6b9ba975e1155a107f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/bpf_sk_storage.c","net/core/sock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.2","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/bpf_sk_storage.c","net/core/sock.c"]}],"references":["https://git.kernel.org/stable/c/ac855efc6bb216b262b672af68219e5b731f42a4","https://git.kernel.org/stable/c/f6814814b3bdd6ecb6bc1fc53ba4e827e0185f01","https://git.kernel.org/stable/c/24139461545e44442df9b80deace26b2eb3e103d","https://git.kernel.org/stable/c/01f8a354497ba739f81b691b3702bc4c46500a4d","https://git.kernel.org/stable/c/14b49b5ab29979552c219a09e569b424fbbf4a6e","https://git.kernel.org/stable/c/7cbd0c4cebe4c9f678d15e6b9ba975e1155a107f"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-30T12:46:06.359Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68399.json","commit":"1f312381e38164a43607eebab851b151dd16861e","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68399","state":"PUBLISHED","datePublished":"2026-08-10T12:04:18.837Z","dateUpdated":"2026-10-30T12:28:27.786Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.389Z"},"containers":{"cna":{"title":"bpf: Fix UAF in sock clone early bailouts","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix UAF in sock clone early bailouts\n\nSimilar to recent commit 9b51a6155d14 (\"bpf,fork: wipe ->bpf_storage\nbefore bailouts that access it\"), sk_clone() performs an initial\nshallow copy of the socket field ->sk_bpf_storage via sock_copy()\nfor the cloned socket newsk.\n\nIf sk_clone() bails out early (e.g. if sk_filter_charge() fails) prior\nto calling bpf_sk_storage_clone(), newsk->sk_bpf_storage still points\nto the parent socket's BPF local storage. When newsk is subsequently\nfreed via sk_free(), the deallocation path (__sk_destruct() ->\nbpf_sk_storage_free()) destroys the parent socket's BPF local storage,\nleading to a use-after-free (UAF) on the parent socket.\n\nFix this by resetting newsk->sk_bpf_storage to NULL immediately after\nsock_copy() in sk_clone(), and remove the now redundant initialization\nfrom bpf_sk_storage_clone()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"ac855efc6bb216b262b672af68219e5b731f42a4","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"f6814814b3bdd6ecb6bc1fc53ba4e827e0185f01","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"24139461545e44442df9b80deace26b2eb3e103d","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"01f8a354497ba739f81b691b3702bc4c46500a4d","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"14b49b5ab29979552c219a09e569b424fbbf4a6e","versionType":"git"},{"version":"6ac99e8f23d4b10258406ca0dd7bffca5f31da9d","status":"affected","lessThan":"7cbd0c4cebe4c9f678d15e6b9ba975e1155a107f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/bpf_sk_storage.c","net/core/sock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.2","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/bpf_sk_storage.c","net/core/sock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ac855efc6bb216b262b672af68219e5b731f42a4"},{"url":"https://git.kernel.org/stable/c/f6814814b3bdd6ecb6bc1fc53ba4e827e0185f01"},{"url":"https://git.kernel.org/stable/c/24139461545e44442df9b80deace26b2eb3e103d"},{"url":"https://git.kernel.org/stable/c/01f8a354497ba739f81b691b3702bc4c46500a4d"},{"url":"https://git.kernel.org/stable/c/14b49b5ab29979552c219a09e569b424fbbf4a6e"},{"url":"https://git.kernel.org/stable/c/7cbd0c4cebe4c9f678d15e6b9ba975e1155a107f"}],"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 vulnerable clone path and its early-bailout condition are driven through the BPF sk_storage subsystem and local socket setup (attaching sk_storage, attaching a socket filter, adjusting optmem_max). Per kernel guidance BPF is Local; a remote peer cannot control the bailout conditions.\nAC:L - An attacker who controls the local setup can deterministically force the early bailout by attaching a filter and lowering net.core.optmem_max below the filter size, exactly the sysctl-change scenario the code documents, making sk_filter_charge fail on every clone.\nPR:L - Reaching the bug requires attaching BPF sk_storage and manipulating socket/net settings; these capabilities (CAP_BPF/CAP_NET_ADMIN) can be reachable via user namespaces in some configurations, so the lower-privilege value is chosen per the higher-severity rule.\nUI:N - The clone is triggered by connection acceptance or association creation with no victim action; no user interaction is needed.\nS:U - The UAF corrupts kernel socket/BPF-storage objects within the kernel's own security authority; no crossing into a separate security scope (no VM/IOMMU boundary).\nC:H - The use-after-free lets the attacker reclaim the freed bpf_local_storage object with controlled contents, enabling disclosure of kernel memory; per guidance UAF is High.\nI:H - UAF on a live socket's BPF storage enables heap grooming and arbitrary-write primitives, giving control-flow hijack potential; per guidance UAF is High.\nA:H - Destroying the parent socket's still-referenced BPF local storage reliably causes memory corruption, oops, and kernel panic; per guidance any UAF/crash is High."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:28:27.786Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.12.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.18.57"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-68399","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:48:12.954788Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T21:09:08.594Z"}}]}}}