syzbot


BUG: corrupted list in new_inode

Status: upstream: reported syz repro on 2025/02/05 00:56
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+2dabb3dce04e28763712@syzkaller.appspotmail.com
First crash: 73d, last: 32d
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: general protection fault in __d_lookup (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] BUG: corrupted list in new_inode 0 (2) 2025/03/09 00:32
Last patch testing requests (4)
Created Duration User Patch Repo Result
2025/02/27 10:20 14m retest repro upstream report log
2025/02/27 10:20 1h22m retest repro upstream report log
2025/02/27 10:20 14m retest repro upstream report log
2025/02/27 10:20 14m retest repro upstream report log

Sample crash report:
 slab debugfs_inode_cache start ffff88805de3b2f0 pointer offset 448 size 1176
list_add corruption. next->prev should be prev (ffff8881416969c0), but was ffffffff9a441100. (next=ffff88805de3b4b0).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:31!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5942 Comm: syz-executor Not tainted 6.14.0-rc2-syzkaller-00041-g4dc1d1bec898 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__list_add_valid_or_report+0xf3/0x130 lib/list_debug.c:29
Code: fe 1a fd 42 80 7c 2d 00 00 74 08 48 89 df e8 e4 3d 3c fd 49 8b 56 08 48 c7 c7 c0 ba 5f 8c 4c 89 e6 4c 89 f1 e8 be dc 3f fc 90 <0f> 0b 4c 89 e7 e8 c3 fe 1a fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 b4
RSP: 0018:ffffc9000420ed58 EFLAGS: 00010246
RAX: 0000000000000075 RBX: ffff88805de3b4b8 RCX: 42f86f3802221300
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 1ffff1100bbc7697 R08: ffffffff819f04dc R09: 1ffff110170e519a
R10: dffffc0000000000 R11: ffffed10170e519b R12: ffff8881416969c0
R13: dffffc0000000000 R14: ffff88805de3b4b0 R15: ffff88805de3b9c8
FS:  000055555a1c0500(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005639808b1000 CR3: 000000007ebb0000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_add_valid include/linux/list.h:88 [inline]
 __list_add include/linux/list.h:150 [inline]
 list_add include/linux/list.h:169 [inline]
 inode_sb_list_add fs/inode.c:617 [inline]
 new_inode+0xc7/0x1d0 fs/inode.c:1195
 debugfs_get_inode fs/debugfs/inode.c:72 [inline]
 debugfs_create_dir+0xf6/0x430 fs/debugfs/inode.c:597
 ieee80211_debugfs_add_netdev net/mac80211/debugfs_netdev.c:1005 [inline]
 ieee80211_debugfs_recreate_netdev+0x1b6/0x14d0 net/mac80211/debugfs_netdev.c:1035
 ieee80211_if_add+0xd68/0x14f0 net/mac80211/iface.c:2188
 ieee80211_register_hw+0x367d/0x4240 net/mac80211/main.c:1604
 mac80211_hwsim_new_radio+0x2a9f/0x4aa0 drivers/net/wireless/virtual/mac80211_hwsim.c:5558
 hwsim_new_radio_nl+0xece/0x2290 drivers/net/wireless/virtual/mac80211_hwsim.c:6242
 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
 genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210
 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline]
 netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348
 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1892
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:733
 __sys_sendto+0x363/0x4c0 net/socket.c:2187
 __do_sys_sendto net/socket.c:2194 [inline]
 __se_sys_sendto net/socket.c:2190 [inline]
 __x64_sys_sendto+0xde/0x100 net/socket.c:2190
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fdce9b8ec7c
Code: 2a 5f 02 00 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 70 5f 02 00 48 8b
RSP: 002b:00007fffdf5596c0 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007fdcea8d4620 RCX: 00007fdce9b8ec7c
RDX: 0000000000000024 RSI: 00007fdcea8d4670 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007fffdf559714 R09: 000000000000000c
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003
R13: 0000000000000000 R14: 00007fdcea8d4670 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_add_valid_or_report+0xf3/0x130 lib/list_debug.c:29
Code: fe 1a fd 42 80 7c 2d 00 00 74 08 48 89 df e8 e4 3d 3c fd 49 8b 56 08 48 c7 c7 c0 ba 5f 8c 4c 89 e6 4c 89 f1 e8 be dc 3f fc 90 <0f> 0b 4c 89 e7 e8 c3 fe 1a fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 b4
RSP: 0018:ffffc9000420ed58 EFLAGS: 00010246
RAX: 0000000000000075 RBX: ffff88805de3b4b8 RCX: 42f86f3802221300
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 1ffff1100bbc7697 R08: ffffffff819f04dc R09: 1ffff110170e519a
R10: dffffc0000000000 R11: ffffed10170e519b R12: ffff8881416969c0
R13: dffffc0000000000 R14: ffff88805de3b4b0 R15: ffff88805de3b9c8
FS:  000055555a1c0500(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005639808b1000 CR3: 000000007ebb0000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/13 02:37 upstream 4dc1d1bec898 b27c2402 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs BUG: corrupted list in new_inode
2025/02/06 18:32 upstream 92514ef226f5 8002dd28 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs BUG: corrupted list in new_inode
2025/02/04 02:23 upstream 0de63bb7d919 8f267cef .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs BUG: corrupted list in new_inode
2025/02/01 00:47 upstream 69b8923f5003 aa47157c .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs BUG: corrupted list in new_inode
2025/03/14 08:11 upstream 4003c9e78778 e2826670 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root BUG: corrupted list in new_inode
* Struck through repros no longer work on HEAD.