# CVE-2025-39913: tcp\_bpf: Call sk\_msg\_free() when tcp\_bpf\_send\_verdict() fails to allocate psock-\>cork.

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 14, 2026-11-28)
- **Published:** 2025-10-01T07:44:36.244Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 08f58d10f5abf11d297cc910754922498c921f91; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 05366527f44cf4b884f3d9462ae8009be9665856; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 7429b8b9bfbc276fd304fbaebc405f46b421fedf; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 9c2a6456bdf9794474460d885c359b6c4522d6e3; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 66bcb04a441fbf15d66834b7e3eefb313dd750c8; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 539920180c55f5e13a2488a2339f94e6b8cb69e0; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< de89e58368f8f07df005ecc1c86ad94898a999f2; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< a3967baad4d533dc254c31e0d221e51c8d223d58
- Anyone running Linux 4.17

## Description

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

tcp\_bpf: Call sk\_msg\_free() when tcp\_bpf\_send\_verdict() fails to allocate psock-\>cork.

syzbot reported the splat below. \[0\]

The repro does the following:

  1. Load a sk\_msg prog that calls bpf\_msg\_cork\_bytes(msg, cork\_bytes)
  2. Attach the prog to a SOCKMAP
  3. Add a socket to the SOCKMAP
  4. Activate fault injection
  5. Send data less than cork\_bytes

At 5., the data is carried over to the next sendmsg() as it is
smaller than the cork\_bytes specified by bpf\_msg\_cork\_bytes().

Then, tcp\_bpf\_send\_verdict() tries to allocate psock-\>cork to hold
the data, but this fails silently due to fault injection + \_\_GFP\_NOWARN.

If the allocation fails, we need to revert the sk-\>sk\_forward\_alloc
change done by sk\_msg\_alloc().

Let's call sk\_msg\_free() when tcp\_bpf\_send\_verdict fails to allocate
psock-\>cork.

The "\*copied" also needs to be updated such that a proper error can
be returned to the caller, sendmsg. It fails to allocate psock-\>cork.
Nothing has been corked so far, so this patch simply sets "\*copied"
to 0.

\[0\]:
WARNING: net/ipv4/af\_inet.c:156 at inet\_sock\_destruct+0x623/0x730 net/ipv4/af\_inet.c:156, CPU\#1: syz-executor/5983
Modules linked in:
CPU: 1 UID: 0 PID: 5983 Comm: syz-executor Not tainted syzkaller \#0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:inet\_sock\_destruct+0x623/0x730 net/ipv4/af\_inet.c:156
Code: 0f 0b 90 e9 62 fe ff ff e8 7a db b5 f7 90 0f 0b 90 e9 95 fe ff ff e8 6c db b5 f7 90 0f 0b 90 e9 bb fe ff ff e8 5e db b5 f7 90 \<0f\> 0b 90 e9 e1 fe ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 9f fc
RSP: 0018:ffffc90000a08b48 EFLAGS: 00010246
RAX: ffffffff8a09d0b2 RBX: dffffc0000000000 RCX: ffff888024a23c80
RDX: 0000000000000100 RSI: 0000000000000fff RDI: 0000000000000000
RBP: 0000000000000fff R08: ffff88807e07c627 R09: 1ffff1100fc0f8c4
R10: dffffc0000000000 R11: ffffed100fc0f8c5 R12: ffff88807e07c380
R13: dffffc0000000000 R14: ffff88807e07c60c R15: 1ffff1100fc0f872
FS:  00005555604c4500(0000) GS:ffff888125af1000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005555604df5c8 CR3: 0000000032b06000 CR4: 00000000003526f0
Call Trace:
 \<IRQ\>
 \_\_sk\_destruct+0x86/0x660 net/core/sock.c:2339
 rcu\_do\_batch kernel/rcu/tree.c:2605 \[inline\]
 rcu\_core+0xca8/0x1770 kernel/rcu/tree.c:2861
 handle\_softirqs+0x286/0x870 kernel/softirq.c:579
 \_\_do\_softirq kernel/softirq.c:613 \[inline\]
 invoke\_softirq kernel/softirq.c:453 \[inline\]
 \_\_irq\_exit\_rcu+0xca/0x1f0 kernel/softirq.c:680
 irq\_exit\_rcu+0x9/0x30 kernel/softirq.c:696
 instr\_sysvec\_apic\_timer\_interrupt arch/x86/kernel/apic/apic.c:1052 \[inline\]
 sysvec\_apic\_timer\_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
 \</IRQ\>

## Affected and fixed versions

- Linux: \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 08f58d10f5abf11d297cc910754922498c921f91; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 05366527f44cf4b884f3d9462ae8009be9665856; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 7429b8b9bfbc276fd304fbaebc405f46b421fedf; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 9c2a6456bdf9794474460d885c359b6c4522d6e3; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 66bcb04a441fbf15d66834b7e3eefb313dd750c8; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 539920180c55f5e13a2488a2339f94e6b8cb69e0; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< de89e58368f8f07df005ecc1c86ad94898a999f2; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< a3967baad4d533dc254c31e0d221e51c8d223d58 (cvelist)
- Linux: 4.17 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-39913. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39913.md
Affected: Linux >= 4f738adba30a7cfc006f605707e7aee847ffefa0, < 08f58d10f5abf11d297cc910754922498c921f91; >= 4f738adba30a7cfc006f605707e7aee847ffefa0, < 05366527f44cf4b884f3d9462ae8009be9665856; >= 4f738adba30a7cfc006f605707e7aee847ffefa0, < 7429b8b9bfbc276fd304fbaebc405f46b421fedf; >= 4f738adba30a7cfc006f605…
Fixed in: Linux 08f58d10f5abf11d297cc910754922498c921f91, Linux 05366527f44cf4b884f3d9462ae8009be9665856, Linux 7429b8b9bfbc276fd304fbaebc405f46b421fedf, Linux 9c2a6456bdf9794474460d885c359b6c4522d6e3, Linux 66bcb04a441fbf15d66834b7e3eefb313dd750c8, Linux 539920180c55f5e13a2488a2339f94e6b8cb69e0

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-39913 being exploited?

There is no confirmed exploitation: CVE-2025-39913 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-39913?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39913?

Linux \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 08f58d10f5abf11d297cc910754922498c921f91; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 05366527f44cf4b884f3d9462ae8009be9665856; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 7429b8b9bfbc276fd304fbaebc405f46b421fedf; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 9c2a6456bdf9794474460d885c359b6c4522d6e3; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 66bcb04a441fbf15d66834b7e3eefb313dd750c8; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< 539920180c55f5e13a2488a2339f94e6b8cb69e0; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< de89e58368f8f07df005ecc1c86ad94898a999f2; \>= 4f738adba30a7cfc006f605707e7aee847ffefa0, \< a3967baad4d533dc254c31e0d221e51c8d223d58; Linux 4.17.

### Is there a fix for CVE-2025-39913?

Yes. Fixed in Linux 08f58d10f5abf11d297cc910754922498c921f91, Linux 05366527f44cf4b884f3d9462ae8009be9665856, Linux 7429b8b9bfbc276fd304fbaebc405f46b421fedf, Linux 9c2a6456bdf9794474460d885c359b6c4522d6e3, Linux 66bcb04a441fbf15d66834b7e3eefb313dd750c8, Linux 539920180c55f5e13a2488a2339f94e6b8cb69e0. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-39913?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/08f58d10f5abf11d297cc910754922498c921f91>
- patch: <https://git.kernel.org/stable/c/05366527f44cf4b884f3d9462ae8009be9665856>
- patch: <https://git.kernel.org/stable/c/7429b8b9bfbc276fd304fbaebc405f46b421fedf>
- patch: <https://git.kernel.org/stable/c/9c2a6456bdf9794474460d885c359b6c4522d6e3>
- patch: <https://git.kernel.org/stable/c/66bcb04a441fbf15d66834b7e3eefb313dd750c8>
- patch: <https://git.kernel.org/stable/c/539920180c55f5e13a2488a2339f94e6b8cb69e0>
- patch: <https://git.kernel.org/stable/c/de89e58368f8f07df005ecc1c86ad94898a999f2>
- patch: <https://git.kernel.org/stable/c/a3967baad4d533dc254c31e0d221e51c8d223d58>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-253495.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-39913>

HTML: <https://flawdb.com/CVE-2025-39913> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-39913>
