Netdev List
 help / color / mirror / Atom feed
* [BUG] net/core: use-after-free in tcp_v4_do_rcv()
@ 2026-08-27 12:42 co
  0 siblings, 0 replies; only message in thread
From: co @ 2026-08-27 12:42 UTC (permalink / raw)
  To: netdev, Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni,
	Willem de Bruijn, David S. Miller, Jakub Kicinski, Simon Horman,
	Daniel Zahka, linux-kernel

We found a bug reachable in:

    path    net/core/sock.c` (missing handling), `net/psp/psp_sock.c`, `net/ipv4
    crash   use-after-free in tcp_v4_do_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+5a7f44e9dc1eab32@bugs.sh

    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/5a7f44e9dc1eab32/patch.diff
        report.md   https://bugs.sh/b/5a7f44e9dc1eab32/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@bugs.sh

== Environment =========================================================
    Reproduced on  7cbfb180945c ("net/sched: sch_cake: fix autorate reconfiguration throttling")
    VM setup       https://bugs.sh/b/5a7f44e9dc1eab32/run.sh
    config         https://bugs.sh/b/5a7f44e9dc1eab32/config.gz
    poc            https://bugs.sh/b/5a7f44e9dc1eab32/repro.c

== Sanitizer Report ====================================================
BUG: KASAN: slab-use-after-free in tcp_v4_do_rcv (./include/net/psp/functions.h:107 ./include/net/psp/functions.h:118 net/ipv4/tcp_ipv4.c:1834)
Read of size 4 at addr ffff88800bf51e14 by task exploit/145
CPU: 1 UID: 0 PID: 145 Comm: exploit Not tainted 7.2.0+ #1 PREEMPTLAZY
Call Trace:
<IRQ>
dump_stack_lvl (lib/dump_stack.c:94 lib/dump_stack.c:120)
print_report (mm/kasan/report.c:378 mm/kasan/report.c:482)
kasan_report (mm/kasan/report.c:595)
tcp_v4_do_rcv (./include/net/psp/functions.h:107 ./include/net/psp/functions.h:118 net/ipv4/tcp_ipv4.c:1834)
tcp_v4_rcv (net/ipv4/tcp_ipv4.c:2238)
ip_protocol_deliver_rcu (net/ipv4/ip_input.c:207 (discriminator 1))
ip_local_deliver_finish (net/ipv4/ip_input.c:241 (discriminator 1))
ip_local_deliver (./include/linux/netfilter.h:325 ./include/linux/netfilter.h:319 net/ipv4/ip_input.c:262)
ip_rcv (./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 (net/core/dev.c:6264 (discriminator 4))
process_backlog (net/core/dev.c:6377 net/core/dev.c:6728)
__napi_poll (net/core/dev.c:7787)
net_rx_action (net/core/dev.c:7850 net/core/dev.c:8007)
handle_softirqs (kernel/softirq.c:645)
do_softirq.part.0 (kernel/softirq.c:546 (discriminator 20))
</IRQ>
__local_bh_enable_ip (kernel/softirq.c:538 kernel/softirq.c:473)
__dev_queue_xmit (./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 (./include/linux/netdevice.h:3461 ./include/net/neighbour.h:544 ./include/net/neighbour.h:558 net/ipv4/ip_output.c:236)
ip_output (./include/linux/netfilter.h:314 net/ipv4/ip_output.c:437)
__ip_queue_xmit (net/ipv4/ip_output.c:533)
__tcp_transmit_skb (net/ipv4/tcp_output.c:1716 (discriminator 4))
tcp_connect (net/ipv4/tcp_output.c:1734 net/ipv4/tcp_output.c:4383)
tcp_v4_connect (net/ipv4/tcp_ipv4.c:345)
__inet_stream_connect (net/ipv4/af_inet.c:684)
inet_stream_connect (net/ipv4/af_inet.c:755)
__sys_connect (net/socket.c:2183)
__x64_sys_connect (net/socket.c:2189 net/socket.c:2186 net/socket.c:2186)
do_syscall_64 (arch/x86/entry/syscall_64.c:61 arch/x86/entry/syscall_64.c:84)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
The buggy address belongs to the object at ffff88800bf51e00
which belongs to the cache kmalloc-cg-192 of size 192
The buggy address is located 20 bytes inside of


---
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@bugs.sh

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-27 12:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 12:42 [BUG] net/core: use-after-free in tcp_v4_do_rcv() co

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox