PT-2026-163354
CVE-2026-139313
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
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.
Found an issue in the description? Have something to add? Feel free to write us 👾