Cloudanix VulnDB

CVE-2025-39913

High · 7.8

CVSS

7.8

EPSS

0.2%

Published

Oct 1, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in Linux kernel networking code could let a local user crash the system or possibly run code with higher privileges.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Failed allocation of psock->cork in tcp_bpf_send_verdict after sk_msg_alloc updates sk_forward_alloc without calling sk_msg_free, leading to memory corruption visible as a warning and potential use-after-free in inet_sock_destruct.

Why it matters to the business

Local attackers on affected Linux systems may trigger kernel panics or memory corruption that disrupts services and could be leveraged for privilege escalation, increasing operational risk on containerized or networked workloads.

How an attack unfolds

An attacker loads a sk_msg BPF program calling bpf_msg_cork_bytes, attaches it to a SOCKMAP, inserts a socket, enables fault injection to fail the cork allocation, then sends data smaller than the cork size; the missing sk_msg_free leaves inconsistent socket state that can be abused for memory corruption.

How to fix it

Upgrade the Linux kernel to the commit 08f58d10f5abf11d297cc910754922498c921f91 or later stable releases that include the fix; rebuild and reboot systems using the updated kernel.

How to confirm the fix worked

Verify the running kernel contains commit 08f58d10f5abf11d297cc910754922498c921f91; test with the original syzbot reproducer under fault injection to confirm no warning in inet_sock_destruct is triggered.

Typical attack path

  1. Load sk_msg BPF program that invokes bpf_msg_cork_bytes
  2. Attach program to SOCKMAP and insert target socket
  3. Activate memory fault injection targeting the cork allocation
  4. Perform sendmsg with payload smaller than cork_bytes
  5. Trigger kernel path that fails to free sk_msg resources and corrupts socket state

How to detect it

Search kernel logs for WARNING messages at net/ipv4/af_inet.c:156 in inet_sock_destruct after BPF send operations; inspect audit logs for loading of sk_msg programs that call bpf_msg_cork_bytes on SOCKMAP-attached sockets.

  • WARNING: net/ipv4/af_inet.c:156 at inet_sock_destruct
  • syz-executor.*tcp_bpf_send_verdict
  • bpf_msg_cork_bytes

What your security team should do

  • Prioritize kernel upgrades on systems exposing SOCKMAP or sk_msg BPF programs
  • Monitor for kernel oops or warnings referencing af_inet.c:156 during BPF send operations
  • Restrict untrusted BPF program loading via LSM or capability controls until patched

The record

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 packages

Ecosystem Package Introduced Fixed
Linux Kernel 4.17.0 5.4.300
Mageia:9 kernel 0 6.6.116-1.mga9
Mageia:9 kernel-linus 0 6.6.116-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.14-13.mga9
Mageia:9 kmod-xtables-addons 0 3.24-87.mga9
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_20 0 1-150600.13.3.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-64kb 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-default 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-default-base 0 6.4.0-150600.23.87.1.150600.12.40.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-docs 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-obs-build 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-source 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-syms 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-zfcpdump 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-default 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-default-base 0 6.4.0-150600.23.87.1.150600.12.40.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-docs 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-obs-build 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-source 0 6.4.0-150600.23.87.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-syms 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.87.1.150600.12.40.1
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.87.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.87.1
openSUSE:Leap 16.0 dtb-aarch64 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-64kb 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-azure 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-default 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-default-base 0 6.12.0-160000.26.1.160000.2.7
openSUSE:Leap 16.0 kernel-docs 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-kvmsmall 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-obs-build 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-obs-qa 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-rt 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-source 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-syms 0 6.12.0-160000.26.1
openSUSE:Leap 16.0 kernel-zfcpdump 0 6.12.0-160000.26.1

Related vulnerabilities