CVE-2025-38154
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
03/07/2025
Last modified:
18/12/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bpf, sockmap: Avoid using sk_socket after free when sending<br />
<br />
The sk->sk_socket is not locked or referenced in backlog thread, and<br />
during the call to skb_send_sock(), there is a race condition with<br />
the release of sk_socket. All types of sockets(tcp/udp/unix/vsock)<br />
will be affected.<br />
<br />
Race conditions:<br />
&#39;&#39;&#39;<br />
CPU0 CPU1<br />
<br />
backlog::skb_send_sock<br />
sendmsg_unlocked<br />
sock_sendmsg<br />
sock_sendmsg_nosec<br />
close(fd):<br />
...<br />
ops->release() -> sock_map_close()<br />
sk_socket->ops = NULL<br />
free(socket)<br />
sock->ops->sendmsg<br />
^<br />
panic here<br />
&#39;&#39;&#39;<br />
<br />
The ref of psock become 0 after sock_map_close() executed.<br />
&#39;&#39;&#39;<br />
void sock_map_close()<br />
{<br />
...<br />
if (likely(psock)) {<br />
...<br />
// !! here we remove psock and the ref of psock become 0<br />
sock_map_remove_links(sk, psock)<br />
psock = sk_psock_get(sk);<br />
if (unlikely(!psock))<br />
goto no_psock; work);
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.162 (including) | 5.15.186 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.95 (including) | 6.1.142 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6.35 (including) | 6.6.94 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9.6 (including) | 6.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.10.1 (including) | 6.12.34 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.15.3 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.10:-:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.10:rc7:*:*:*:*:*:* | ||
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/15c0250dae3b48a398447d2b364603821ed4ed90
- https://git.kernel.org/stable/c/4c6fa65ab2aec7df94809478c8d28ef38676a1b7
- https://git.kernel.org/stable/c/4edb40b05cb6a261775abfd8046804ca139a5546
- https://git.kernel.org/stable/c/7c0a16f6ea2b1c82a03bccd5d1bdb4a7bbd4d987
- https://git.kernel.org/stable/c/8259eb0e06d8f64c700f5fbdb28a5c18e10de291
- https://git.kernel.org/stable/c/b19cbf0b9a91f5a0d93fbcd761ff71c48ab40ed9
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html



