syzbot


kernel BUG in set_state_bits

Status: upstream: reported C repro on 2022/12/01 12:20
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+b9d2e54d2301324657ed@syzkaller.appspotmail.com
First crash: 721d, last: 137d
Cause bisection: introduced by (bisect log) :
commit 05fd9564e9faf0f23b4676385e27d9405cef6637
Author: Darrick J. Wong <djwong@kernel.org>
Date: Mon Mar 14 17:55:32 2022 +0000

  btrfs: fix fallocate to use file_modified to update permissions consistently

Crash: kernel BUG in set_state_bits (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 33336c1805d3a03240afda0bfb8c8d20395fb1d3
Author: Boris Burkov <boris@bur.io>
Date: Thu Jun 20 17:33:10 2024 +0000

  btrfs: preallocate ulist memory for qgroup rsv

  
Discussions (5)
Title Replies (including bot) Last reply
[syzbot] kernel BUG in set_state_bits 2 (7) 2024/08/07 11:33
[syzbot] Monthly btrfs report (Jul 2024) 0 (1) 2024/07/15 14:03
[syzbot] Monthly btrfs report (May 2024) 0 (1) 2024/05/13 21:13
[syzbot] Monthly btrfs report (Mar 2024) 0 (1) 2024/03/12 09:29
[syzbot] Monthly btrfs report (Feb 2024) 2 (3) 2024/02/12 12:15
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 kernel BUG in set_state_bits origin:upstream C error 13 4d10h 597d 0/3 upstream: reported C repro on 2023/04/03 19:24
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/11/09 02:38 15m retest repro upstream report log
2024/09/28 23:01 19m retest repro upstream report log
2024/09/15 02:55 20m retest repro upstream OK log
2024/09/14 16:21 24m retest repro linux-next report log
2024/08/30 16:03 29m retest repro upstream OK log
2024/08/30 16:03 4h03m retest repro upstream report log
2024/08/14 11:54 31m retest repro upstream OK log
2024/07/22 03:25 21m retest repro linux-next OK log
2024/07/22 03:25 23m retest repro linux-next OK log
2024/07/22 03:25 23m retest repro linux-next OK log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/08/06 12:02 7h22m bisect fix upstream OK (1) job log
2023/04/21 06:52 47m bisect fix upstream OK (0) job log log
2023/03/10 05:40 24m bisect fix upstream OK (0) job log log

Sample crash report:
RBP: 0000000000000006 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000280404 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffc1540df90 R14: 0000000000000003 R15: 00007ffc1540df8a
 </TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:379!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 4992 Comm: syz-executor304 Not tainted 6.4.0-rc7-syzkaller-00226-ga92b7d26c743 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:set_state_bits.isra.0+0x17b/0x1c0 fs/btrfs/extent-io-tree.c:379
Code: 38 d0 7c 04 84 d2 75 31 44 8b 73 7c e8 ce 5b f8 fd 44 89 e0 44 09 f0 89 43 7c 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 b5 5b f8 fd <0f> 0b 4c 89 ef e8 3b 32 4a fe e9 e6 fe ff ff 4c 89 ef e8 2e 32 4a
RSP: 0018:ffffc900033efa88 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888029a0c240 RCX: 0000000000000000
RDX: ffff88807af561c0 RSI: ffffffff838b0f8b RDI: 0000000000000005
RBP: 00000000fffffff4 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff4 R11: 0000000000000001 R12: 0000000000000800
R13: ffff888029a0c2bc R14: 0000000000280fff R15: 0000000000000000
FS:  0000555556d4e300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffddc408468 CR3: 000000002d352000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __set_extent_bit+0xb81/0x15f0 fs/btrfs/extent-io-tree.c:1042
 set_record_extent_bits+0x5c/0x90 fs/btrfs/extent-io-tree.c:1690
 qgroup_reserve_data+0x233/0xa80 fs/btrfs/qgroup.c:3786
 btrfs_qgroup_reserve_data+0x2f/0xd0 fs/btrfs/qgroup.c:3829
 btrfs_fallocate+0x801/0x27f0 fs/btrfs/file.c:3147
 vfs_fallocate+0x48b/0xe40 fs/open.c:324
 ksys_fallocate fs/open.c:347 [inline]
 __do_sys_fallocate fs/open.c:355 [inline]
 __se_sys_fallocate fs/open.c:353 [inline]
 __x64_sys_fallocate+0xd3/0x140 fs/open.c:353
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3b2cdc2399
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc1540df58 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f3b2cdc2399
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 0000000000000006 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000280404 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffc1540df90 R14: 0000000000000003 R15: 00007ffc1540df8a
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:set_state_bits.isra.0+0x17b/0x1c0 fs/btrfs/extent-io-tree.c:379
Code: 38 d0 7c 04 84 d2 75 31 44 8b 73 7c e8 ce 5b f8 fd 44 89 e0 44 09 f0 89 43 7c 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 b5 5b f8 fd <0f> 0b 4c 89 ef e8 3b 32 4a fe e9 e6 fe ff ff 4c 89 ef e8 2e 32 4a
RSP: 0018:ffffc900033efa88 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888029a0c240 RCX: 0000000000000000
RDX: ffff88807af561c0 RSI: ffffffff838b0f8b RDI: 0000000000000005
RBP: 00000000fffffff4 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000fffffff4 R11: 0000000000000001 R12: 0000000000000800
R13: ffff888029a0c2bc R14: 0000000000280fff R15: 0000000000000000
FS:  0000555556d4e300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffddc408468 CR3: 000000002d352000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (97):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/24 23:02 upstream a92b7d26c743 09ffe269 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/06/22 19:35 upstream dad9774deaf1 09ffe269 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/08/02 04:14 linux-next a73466257270 df07ffe8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/11/14 17:30 upstream 9bacdd8996c7 cb976f63 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/09/15 21:11 upstream 9fdfb15a3dbf 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/09/14 12:20 upstream aed8aee11130 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/06/14 21:47 upstream b6dad5178cea d2ee9228 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/03/22 06:25 upstream 2faac9a98f01 8b4eb097 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2022/12/11 05:17 upstream 296a7b7eb792 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/06/11 02:41 linux-next 715abedee4cd 7086cdb9 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/05/13 22:59 linux-next e922ba281a8d 2b9ba477 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/05/12 22:41 linux-next e922ba281a8d ecca8a24 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/01/09 17:02 linux-next 543b9b2fe10b 1dac8c7a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/01/08 04:23 linux-next cc3c08b41a9c 1dac8c7a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2024/05/12 13:18 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2024/03/02 09:50 upstream 17ba56605bfd 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in set_state_bits
2024/02/27 01:14 upstream d206a76d7d27 da36a36b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in set_state_bits
2024/01/28 11:27 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2024/01/18 04:31 upstream 1b1934dbbdcf 915053c7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2024/01/10 04:28 upstream 6c1dd1fe5d8a b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/11/09 16:44 upstream 6bc986ab839c 4862372a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/09/24 06:38 upstream 3aba70aed91f 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/09/19 07:30 upstream 2cf0f7156238 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/09/15 14:52 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2023/09/15 13:10 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/09/15 08:07 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/09/11 21:46 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/06/13 07:15 upstream fd37b884003c 749afb64 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root kernel BUG in set_state_bits
2024/03/11 17:32 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/03/11 02:07 upstream 137e0ec05aeb 6ee49f2e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/03/06 16:54 upstream 5847c9777c30 f39a7eed .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/03/01 19:14 upstream 87adedeba51a 83acf9e0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/02/29 22:12 upstream 805d849d7c3c 352ab904 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/02/17 05:22 upstream 0f1dd5e91e2b 578f7538 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/02/09 11:44 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/19 09:06 upstream b0d326da462e 21772ce4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/17 01:41 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/10 12:17 upstream 35f11a3710cd b438bd66 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/10 07:02 upstream 35f11a3710cd b438bd66 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/09 07:34 upstream 5db8752c3b81 4c0fd4bb .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/08 05:35 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/04 14:39 upstream ac865f00af29 28c42cff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/03 10:51 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/12/22 21:43 upstream 8afe6f0e0e25 fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/12/15 02:21 upstream c7402612e2e6 3222d10c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/12/12 16:30 upstream 26aff849438c ebcad15c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/12/09 19:01 upstream f2e8a57ee903 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/12/02 23:16 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/11/27 08:20 upstream d2da77f431ac 5b429f39 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/11/18 17:03 upstream 791c8ab095f7 cb976f63 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/11/07 06:39 upstream be3ca57cfb77 83211397 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/11/05 04:19 upstream 90b0c2b2edd1 500bfdc4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/11/04 08:28 upstream 2c40c1c6adab 500bfdc4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/10/29 04:56 upstream 51a7691038c3 3c418d72 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/10/28 12:42 upstream 56567a20b22b 3c418d72 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/10/18 15:55 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/10/13 09:29 upstream e8c127b05766 6388bc36 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/10/12 15:54 upstream 401644852d0b 1b231e3c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/10/10 16:45 upstream 94f6f0550c62 83165b57 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/09/14 20:40 upstream aed8aee11130 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2023/09/12 03:20 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in set_state_bits
2024/01/11 09:53 upstream acc657692aed 00f3cc59 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in set_state_bits
2024/01/10 18:47 upstream ab27740f7665 04815ef1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in set_state_bits
2023/12/10 14:58 upstream c527f5606aa5 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in set_state_bits
2022/12/01 05:36 upstream 04aa64375f48 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in set_state_bits
2023/12/28 06:56 linux-next 39676dfe5233 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/12/25 04:25 linux-next 39676dfe5233 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/12/21 23:59 linux-next 857647efa9be 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
2023/11/05 21:48 linux-next e27090b1413f 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in set_state_bits
* Struck through repros no longer work on HEAD.