[BUG] net/ipv4: NULL pointer dereference in tcp_v4_rcv()
From: co
Date: Thu Aug 27 2026 - 08:47:11 EST
We found a bug reachable in:
path net/ipv4
crash NULL pointer dereference in tcp_v4_rcv()
commit 7cbfb180945c ("net/sched: sch_cake: fix autorate reconfiguration throttling")
Config, environment, the sanitizer report and a C reproducer follow.
== Notes ===============================================================
If you patch the bug based on our artifacts, a tag would be
appreciated:
Reported-by: co+2c72469dbbec34af@xxxxxxx
Everything in this mail is validated by the reproducer below.
We also hold an LLM-generated root-cause analysis and a candidate
patch. The patch passes an A/B test: the same reproducer panics the
unpatched kernel and runs clean on the patched one. Neither has had
human review, so both still require validation before you send or
apply them. Available on:
patch.diff https://bugs.sh/b/2c72469dbbec34af/patch.diff
report.md https://bugs.sh/b/2c72469dbbec34af/report.md
This is an open science project. The code and the full set of PoCs
are not public at this moment, as we intend to disclose our findings
in an ethical way.
Happy to test patches. Complaints and suggestions about our work
are welcome at:
cedalion@xxxxxxx
== Environment =========================================================
Reproduced on 7cbfb180945c ("net/sched: sch_cake: fix autorate reconfiguration throttling")
VM setup https://bugs.sh/b/2c72469dbbec34af/run.sh
config https://bugs.sh/b/2c72469dbbec34af/config.gz
poc https://bugs.sh/b/2c72469dbbec34af/repro.c
== Sanitizer Report ====================================================
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000010: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000080-0x0000000000000087]
CPU: 1 UID: 0 PID: 145 Comm: exploit Not tainted 7.2.0+ #63 PREEMPTLAZY
RIP: 0010:tcp_v4_rcv+0x2637/0x3fe0 (net/ipv4/tcp_ipv4.c:1055 <- net/ipv4/tcp_ipv4.c:2333)
Call Trace:
<IRQ>
ip_protocol_deliver_rcu+0x66/0x310 (net/ipv4/ip_input.c:207 (discriminator 1))
ip_local_deliver_finish+0x356/0x4f0 (net/ipv4/ip_input.c:241 (discriminator 1))
ip_local_deliver+0x25c/0x2c0 (./include/linux/netfilter.h:325 <- ./include/linux/netfilter.h:319 <- net/ipv4/ip_input.c:262)
ip_rcv+0x301/0x370 (./include/net/dst.h:480 (discriminator 6) <- net/ipv4/ip_input.c:492 (discriminator 6) <- ./include/linux/netfilter.h:325 (discriminator 6) <- ./include/linux/netfilter.h:319 (discriminator 6) <- net/ipv4/ip_input.c:612 (discriminator 6))
__netif_receive_skb_one_core+0x166/0x1b0 (net/core/dev.c:6264 (discriminator 4))
process_backlog+0x1d7/0x700 (net/core/dev.c:6377 <- net/core/dev.c:6728)
__napi_poll+0xa1/0x560 (net/core/dev.c:7787)
net_rx_action+0x401/0xd80 (net/core/dev.c:7850 <- net/core/dev.c:8007)
handle_softirqs+0x1a4/0x620 (kernel/softirq.c:645)
do_softirq.part.0+0x3b/0x60 (kernel/softirq.c:546 (discriminator 20))
</IRQ>
__local_bh_enable_ip+0x6d/0x70 (kernel/softirq.c:538 <- kernel/softirq.c:473)
__dev_queue_xmit+0x83e/0x36a0 (./include/linux/bottom_half.h:33 (discriminator 1) <- ./include/linux/rcupdate.h:914 (discriminator 1) <- net/core/dev.c:4961 (discriminator 1))
ip_finish_output2+0x8da/0x19c0 (./include/linux/netdevice.h:3461 <- ./include/net/neighbour.h:544 <- ./include/net/neighbour.h:558 <- net/ipv4/ip_output.c:236)
ip_output+0x162/0x2c0 (./include/linux/netfilter.h:314 <- net/ipv4/ip_output.c:437)
__ip_queue_xmit+0x7cf/0x1dc0 (net/ipv4/ip_output.c:533)
__tcp_transmit_skb+0x303b/0x4a30 (net/ipv4/tcp_output.c:1716 (discriminator 4))
tcp_connect+0x2a92/0x5060 (net/ipv4/tcp_output.c:1734 <- net/ipv4/tcp_output.c:4383)
tcp_v4_connect+0x1186/0x17c0 (net/ipv4/tcp_ipv4.c:345)
__inet_stream_connect+0x224/0xf60 (net/ipv4/af_inet.c:684)
inet_stream_connect+0x57/0xa0 (net/ipv4/af_inet.c:755)
__sys_connect+0x101/0x130 (net/socket.c:2183)
__x64_sys_connect+0x72/0xb0 (net/socket.c:2189 <- net/socket.c:2186 <- net/socket.c:2186)
do_syscall_64+0x94/0x450 (arch/x86/entry/syscall_64.c:61 <- arch/x86/entry/syscall_64.c:84)
entry_SYSCALL_64_after_hwframe+0x76/0x7e (arch/x86/entry/entry_64.S:121)
Kernel panic - not syncing: Fatal exception in interrupt
---
The report format is based on syzbot bug report.
This report is generated by a bot. It may contain errors.
See https://github.com/n132/cedalion for more information.
For any issue with this report, reach out to cedalion@xxxxxxx
If the report is already addressed, let us know by replying with:
#co fix: <commit hash>
If the report is a duplicate of another one, reply with:
#co dup: <lore link>
If you want to undo deduplication, reply with:
#co undup