syzbot


KASAN: slab-use-after-free Read in ip_skb_dst_mtu (2)

Status: upstream: reported syz repro on 2025/03/08 00:01
Subsystems: net bcachefs
[Documentation on labels]
Reported-by: syzbot+98d6cedbab2dd7eaa17e@syzkaller.appspotmail.com
First crash: 10d, last: 10d
Cause bisection: introduced by (bisect log) :
commit 14152654805256d760315ec24e414363bfa19a06
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Mon Nov 25 05:21:27 2024 +0000

  bcachefs: Bad btree roots are now autofix

Crash: go runtime error (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [net?] [bcachefs?] KASAN: slab-use-after-free Read in ip_skb_dst_mtu (2) 0 (1) 2025/03/08 00:01
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in ip_skb_dst_mtu netfilter C error 5 339d 370d 25/28 fixed on 2024/05/22 23:56
linux-5.15 KASAN: use-after-free Read in ip_skb_dst_mtu origin:upstream C inconclusive 2 284d 390d 0/3 auto-obsoleted due to no activity on 2024/12/14 20:26

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in sk_fullsock include/net/sock.h:2787 [inline]
BUG: KASAN: slab-use-after-free in ip_skb_dst_mtu+0xa42/0xbc0 include/net/ip.h:515
Read of size 1 at addr ffff88805fe4154a by task kworker/1:2/975

CPU: 1 UID: 0 PID: 975 Comm: kworker/1:2 Not tainted 6.14.0-rc4-syzkaller-00248-g03d38806a902 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: mld mld_dad_work
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:408 [inline]
 print_report+0x16e/0x5b0 mm/kasan/report.c:521
 kasan_report+0x143/0x180 mm/kasan/report.c:634
 sk_fullsock include/net/sock.h:2787 [inline]
 ip_skb_dst_mtu+0xa42/0xbc0 include/net/ip.h:515
 __ip_finish_output+0x12b/0x400 net/ipv4/ip_output.c:307
 iptunnel_xmit+0x55d/0x9b0 net/ipv4/ip_tunnel_core.c:82
 udp_tunnel_xmit_skb+0x262/0x3b0 net/ipv4/udp_tunnel_core.c:173
 geneve_xmit_skb drivers/net/geneve.c:916 [inline]
 geneve_xmit+0x210e/0x2bf0 drivers/net/geneve.c:1039
 __netdev_start_xmit include/linux/netdevice.h:5151 [inline]
 netdev_start_xmit include/linux/netdevice.h:5160 [inline]
 xmit_one net/core/dev.c:3800 [inline]
 dev_hard_start_xmit+0x27a/0x7d0 net/core/dev.c:3816
 __dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4649
 dev_queue_xmit include/linux/netdevice.h:3313 [inline]
 neigh_hh_output include/net/neighbour.h:523 [inline]
 neigh_output include/net/neighbour.h:537 [inline]
 ip6_finish_output2+0x127d/0x17c0 net/ipv6/ip6_output.c:141
 ip6_finish_output+0x41e/0x840 net/ipv6/ip6_output.c:226
 NF_HOOK+0x9e/0x430 include/linux/netfilter.h:314
 mld_sendpack+0x843/0xdb0 net/ipv6/mcast.c:1868
 mld_dad_work+0x44/0x500 net/ipv6/mcast.c:2308
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
 worker_thread+0x870/0xd30 kernel/workqueue.c:3400
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Last potentially related work creation:
------------[ cut here ]------------
pool index 54431 out of bounds (772) for stack id 8c38d4a0
WARNING: CPU: 1 PID: 975 at lib/stackdepot.c:452 depot_fetch_stack+0x86/0xc0 lib/stackdepot.c:451
Modules linked in:
CPU: 1 UID: 0 PID: 975 Comm: kworker/1:2 Not tainted 6.14.0-rc4-syzkaller-00248-g03d38806a902 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: mld mld_dad_work
RIP: 0010:depot_fetch_stack+0x86/0xc0 lib/stackdepot.c:451
Code: 83 7c 18 1c 00 74 38 48 01 d8 eb 24 90 0f 0b 90 44 39 f5 72 ca 90 48 c7 c7 6e af 39 8e 89 ee 44 89 f2 89 d9 e8 fb be 5b fc 90 <0f> 0b 90 90 31 c0 5b 41 5e 5d c3 cc cc cc cc 90 0f 0b 90 eb ef 90
RSP: 0018:ffffc90003836d28 EFLAGS: 00010046
RAX: eec25f5fb9356300 RBX: 000000008c38d4a0 RCX: ffff888026575a00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 000000000000d49f R08: ffffffff81817d42 R09: 1ffff110170e519a
R10: dffffc0000000000 R11: ffffed10170e519b R12: ffff88805fe4154a
R13: ffffea00017f9000 R14: 0000000000000304 R15: ffffc90003836df8
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f086af09000 CR3: 00000000798e8000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 stack_depot_fetch lib/stackdepot.c:714 [inline]
 stack_depot_print+0x16/0x50 lib/stackdepot.c:752
 kasan_print_aux_stacks+0x38/0x70 mm/kasan/report_generic.c:199
 describe_object_stacks mm/kasan/report.c:347 [inline]
 describe_object mm/kasan/report.c:353 [inline]
 print_address_description mm/kasan/report.c:412 [inline]
 print_report+0x22b/0x5b0 mm/kasan/report.c:521
 kasan_report+0x143/0x180 mm/kasan/report.c:634
 sk_fullsock include/net/sock.h:2787 [inline]
 ip_skb_dst_mtu+0xa42/0xbc0 include/net/ip.h:515
 __ip_finish_output+0x12b/0x400 net/ipv4/ip_output.c:307
 iptunnel_xmit+0x55d/0x9b0 net/ipv4/ip_tunnel_core.c:82
 udp_tunnel_xmit_skb+0x262/0x3b0 net/ipv4/udp_tunnel_core.c:173
 geneve_xmit_skb drivers/net/geneve.c:916 [inline]
 geneve_xmit+0x210e/0x2bf0 drivers/net/geneve.c:1039
 __netdev_start_xmit include/linux/netdevice.h:5151 [inline]
 netdev_start_xmit include/linux/netdevice.h:5160 [inline]
 xmit_one net/core/dev.c:3800 [inline]
 dev_hard_start_xmit+0x27a/0x7d0 net/core/dev.c:3816
 __dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4649
 dev_queue_xmit include/linux/netdevice.h:3313 [inline]
 neigh_hh_output include/net/neighbour.h:523 [inline]
 neigh_output include/net/neighbour.h:537 [inline]
 ip6_finish_output2+0x127d/0x17c0 net/ipv6/ip6_output.c:141
 ip6_finish_output+0x41e/0x840 net/ipv6/ip6_output.c:226
 NF_HOOK+0x9e/0x430 include/linux/netfilter.h:314
 mld_sendpack+0x843/0xdb0 net/ipv6/mcast.c:1868
 mld_dad_work+0x44/0x500 net/ipv6/mcast.c:2308
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
 worker_thread+0x870/0xd30 kernel/workqueue.c:3400
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/01 18:31 upstream 03d38806a902 c3901742 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: slab-use-after-free Read in ip_skb_dst_mtu
* Struck through repros no longer work on HEAD.