{"api_version":"1","generated_at":"2026-11-30T15:13:35+00:00","cve":"CVE-2026-139313","urls":{"html":"https://cve.report/CVE-2026-139313","api":"https://cve.report/api/cve/CVE-2026-139313.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139313","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139313"},"summary":{"title":"bpf: Clear sk_refcnt of a clone before its storage is linked","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Clear sk_refcnt of a clone before its storage is linked\n\nsk_clone() sets sk_refcnt of the new socket some lines behind\nbpf_sk_storage_clone(). But the elements which that function copies are\nlinked to their maps at once, and an element leads to its owner: the\niterator over a sk_storage map hands the owner to its program.\nbpf_sk_storage_get() with BPF_SK_STORAGE_GET_F_CREATE and\nbpf_sk_storage_delete() rely on refcount_inc_not_zero() to tell whether\nthey may touch the socket.\n\nsk_refcnt is in the part of struct sock which sock_copy() leaves out, and\nsk_prot_alloc() does not clear a clone unless init_on_alloc is on. It is\nzero in an object which has been a socket before, and anything in one\nwhich has not. If it is not zero, a helper gets a reference which\nrefcount_set() wipes out, and the helper's sock_put() then drops one of\nthe two references of the new socket, which is freed too early:\n\n  IPv4: Attempt to release TCP socket in state 1\n  BUG: KASAN: slab-use-after-free in __raw_spin_lock_init+0x47/0x90\n\nIn the meantime the helper changes a storage which bpf_sk_storage_clone()\nfills without taking its lock.\n\nNothing else can find the clone at this point. Say that it is not alive\nyet, before the first element is linked. Sockets whose parent has no\nstorage are left alone.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:55","updated_at":"2026-11-30 14:18:55"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/1e49688900d8bddc0cf626ba5cc780c34b58ef58","name":"https://git.kernel.org/stable/c/1e49688900d8bddc0cf626ba5cc780c34b58ef58","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/28051395df6e8829f7f168c6eef4a4e411cbbc37","name":"https://git.kernel.org/stable/c/28051395df6e8829f7f168c6eef4a4e411cbbc37","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e43a39cdd14639bba5c7b66d1e99ea4948cec04c","name":"https://git.kernel.org/stable/c/e43a39cdd14639bba5c7b66d1e99ea4948cec04c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/22f100bd013458836c3d0eaf8050b854d7534a66","name":"https://git.kernel.org/stable/c/22f100bd013458836c3d0eaf8050b854d7534a66","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/856649a34a66e1e485ecfee12d0f9e7f02896d52","name":"https://git.kernel.org/stable/c/856649a34a66e1e485ecfee12d0f9e7f02896d52","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fc6d7288e0521de69b6e130278563138551e5c7e","name":"https://git.kernel.org/stable/c/fc6d7288e0521de69b6e130278563138551e5c7e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a5b2375d755a6f7841ef25301bc824e089060454","name":"https://git.kernel.org/stable/c/a5b2375d755a6f7841ef25301bc824e089060454","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139313","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139313","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 fc6d7288e0521de69b6e130278563138551e5c7e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 856649a34a66e1e485ecfee12d0f9e7f02896d52 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 1e49688900d8bddc0cf626ba5cc780c34b58ef58 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 a5b2375d755a6f7841ef25301bc824e089060454 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 28051395df6e8829f7f168c6eef4a4e411cbbc37 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 e43a39cdd14639bba5c7b66d1e99ea4948cec04c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a50a85e40c59cf27ca3b324a5aa4c7f35314f251 22f100bd013458836c3d0eaf8050b854d7534a66 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.11","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.11 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/core/bpf_sk_storage.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"fc6d7288e0521de69b6e130278563138551e5c7e","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"},{"lessThan":"856649a34a66e1e485ecfee12d0f9e7f02896d52","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"},{"lessThan":"1e49688900d8bddc0cf626ba5cc780c34b58ef58","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"},{"lessThan":"a5b2375d755a6f7841ef25301bc824e089060454","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"},{"lessThan":"28051395df6e8829f7f168c6eef4a4e411cbbc37","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"},{"lessThan":"e43a39cdd14639bba5c7b66d1e99ea4948cec04c","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"},{"lessThan":"22f100bd013458836c3d0eaf8050b854d7534a66","status":"affected","version":"a50a85e40c59cf27ca3b324a5aa4c7f35314f251","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/core/bpf_sk_storage.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.11"},{"lessThan":"5.11","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"5.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"5.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"5.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"5.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"5.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"5.11","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.11","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Clear sk_refcnt of a clone before its storage is linked\n\nsk_clone() sets sk_refcnt of the new socket some lines behind\nbpf_sk_storage_clone(). But the elements which that function copies are\nlinked to their maps at once, and an element leads to its owner: the\niterator over a sk_storage map hands the owner to its program.\nbpf_sk_storage_get() with BPF_SK_STORAGE_GET_F_CREATE and\nbpf_sk_storage_delete() rely on refcount_inc_not_zero() to tell whether\nthey may touch the socket.\n\nsk_refcnt is in the part of struct sock which sock_copy() leaves out, and\nsk_prot_alloc() does not clear a clone unless init_on_alloc is on. It is\nzero in an object which has been a socket before, and anything in one\nwhich has not. If it is not zero, a helper gets a reference which\nrefcount_set() wipes out, and the helper's sock_put() then drops one of\nthe two references of the new socket, which is freed too early:\n\n  IPv4: Attempt to release TCP socket in state 1\n  BUG: KASAN: slab-use-after-free in __raw_spin_lock_init+0x47/0x90\n\nIn the meantime the helper changes a storage which bpf_sk_storage_clone()\nfills without taking its lock.\n\nNothing else can find the clone at this point. Say that it is not alive\nyet, before the first element is linked. Sockets whose parent has no\nstorage are left alone."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:33:35.937Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/fc6d7288e0521de69b6e130278563138551e5c7e"},{"url":"https://git.kernel.org/stable/c/856649a34a66e1e485ecfee12d0f9e7f02896d52"},{"url":"https://git.kernel.org/stable/c/1e49688900d8bddc0cf626ba5cc780c34b58ef58"},{"url":"https://git.kernel.org/stable/c/a5b2375d755a6f7841ef25301bc824e089060454"},{"url":"https://git.kernel.org/stable/c/28051395df6e8829f7f168c6eef4a4e411cbbc37"},{"url":"https://git.kernel.org/stable/c/e43a39cdd14639bba5c7b66d1e99ea4948cec04c"},{"url":"https://git.kernel.org/stable/c/22f100bd013458836c3d0eaf8050b854d7534a66"}],"title":"bpf: Clear sk_refcnt of a clone before its storage is linked","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139313","datePublished":"2026-11-30T13:33:35.937Z","dateReserved":"2026-11-30T13:22:15.926Z","dateUpdated":"2026-11-30T13:33:35.937Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:55","lastModifiedDate":"2026-11-30 14:18:55","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139313","Ordinal":"1","Title":"bpf: Clear sk_refcnt of a clone before its storage is linked","CVE":"CVE-2026-139313","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139313","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Clear sk_refcnt of a clone before its storage is linked\n\nsk_clone() sets sk_refcnt of the new socket some lines behind\nbpf_sk_storage_clone(). But the elements which that function copies are\nlinked to their maps at once, and an element leads to its owner: the\niterator over a sk_storage map hands the owner to its program.\nbpf_sk_storage_get() with BPF_SK_STORAGE_GET_F_CREATE and\nbpf_sk_storage_delete() rely on refcount_inc_not_zero() to tell whether\nthey may touch the socket.\n\nsk_refcnt is in the part of struct sock which sock_copy() leaves out, and\nsk_prot_alloc() does not clear a clone unless init_on_alloc is on. It is\nzero in an object which has been a socket before, and anything in one\nwhich has not. If it is not zero, a helper gets a reference which\nrefcount_set() wipes out, and the helper's sock_put() then drops one of\nthe two references of the new socket, which is freed too early:\n\n  IPv4: Attempt to release TCP socket in state 1\n  BUG: KASAN: slab-use-after-free in __raw_spin_lock_init+0x47/0x90\n\nIn the meantime the helper changes a storage which bpf_sk_storage_clone()\nfills without taking its lock.\n\nNothing else can find the clone at this point. Say that it is not alive\nyet, before the first element is linked. Sockets whose parent has no\nstorage are left alone.","Type":"Description","Title":"bpf: Clear sk_refcnt of a clone before its storage is linked"}]}}}