CVE-2026-139313

Not scored yetLast modified Nov 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Clear sk_refcnt of a clone before its storage is linked

sk_clone() sets sk_refcnt of the new socket some lines behind bpf_sk_storage_clone(). But the elements which that function copies are linked to their maps at once, and an element leads to its owner: the iterator over a sk_storage map hands the owner to its program. bpf_sk_storage_get() with BPF_SK_STORAGE_GET_F_CREATE and bpf_sk_storage_delete() rely on refcount_inc_not_zero() to tell whether they may touch the socket.

sk_refcnt is in the part of struct sock which sock_copy() leaves out, and sk_prot_alloc() does not clear a clone unless init_on_alloc is on. It is zero in an object which has been a socket before, and anything in one which has not. If it is not zero, a helper gets a reference which refcount_set() wipes out, and the helper's sock_put() then drops one of the two references of the new socket, which is freed too early:

IPv4: Attempt to release TCP socket in state 1 BUG: KASAN: slab-use-after-free in __raw_spin_lock_init+0x47/0x90

In the meantime the helper changes a storage which bpf_sk_storage_clone() fills without taking its lock.

Nothing else can find the clone at this point. Say that it is not alive yet, before the first element is linked. Sockets whose parent has no storage are left alone.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

VendorProductVersions
LinuxLinux>= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < fc6d7288e0521de69b6e130278563138551e5c7e; >= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < 856649a34a66e1e485ecfee12d0f9e7f02896d52; >= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < 1e49688900d8bddc0cf626ba5cc780c34b58ef58; >= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < a5b2375d755a6f7841ef25301bc824e089060454; >= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < 28051395df6e8829f7f168c6eef4a4e411cbbc37; >= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < e43a39cdd14639bba5c7b66d1e99ea4948cec04c; >= a50a85e40c59cf27ca3b324a5aa4c7f35314f251, < 22f100bd013458836c3d0eaf8050b854d7534a66
LinuxLinux5.11

References

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139314In the Linux kernel, the following vulnerability has been resolved: bpf: Update the SRH state if End.B6 fails late For SEG6_LOCAL_ACTION_ECVE-2026-139315In the Linux kernel, the following vulnerability has been resolved: bpf: Pull the inner header for End.DT6 in End.BPF bpf_lwt_seg6_action(CVE-2026-1393168.1In the Linux kernel, the following vulnerability has been resolved: bpf: Validate the SRH which End.DT6 uncovers in End.BPF input_action_eCVE-2026-139317In the Linux kernel, the following vulnerability has been resolved: bpf: Don't saturate owner_refcnt on the last unpin bpf_local_storage_mCVE-2026-139318In the Linux kernel, the following vulnerability has been resolved: bpf: Read the probe of a perf event under event_mutex For a perf eventCVE-2026-139319In the Linux kernel, the following vulnerability has been resolved: bpf: Don't let bpf_skb_adjust_room() use up the MSS When bpf_skb_adjusCVE-2026-139326.5Inappropriate implementation in Sharing in Google Chrome on Android prior to 150.0.7871.47 allowed a remote attacker who had compromised theCVE-2026-1393207.8In the Linux kernel, the following vulnerability has been resolved: bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit In the branch ofCVE-2026-139321In the Linux kernel, the following vulnerability has been resolved: bpf: Forbid sleeping in bpf_find_vma() callbacks A sleepable program cCVE-2026-139322In the Linux kernel, the following vulnerability has been resolved: bpf: Reject sleepable programs for task_vma iterator A sleepable "iterCVE-2026-139323In the Linux kernel, the following vulnerability has been resolved: bpf: Don't hand out a linked element as extra element When htab_map_upCVE-2026-139324In the Linux kernel, the following vulnerability has been resolved: bpf: Don't leak the inode when token creation fails bpf_token_create()
CVE-2026-139313: Unscored | Vulnix