syzbot


kernel BUG in insert_state_fast

Status: upstream: reported C repro on 2022/11/29 21:10
Labels: btrfs (incorrect?)
Reported-by: syzbot+9ce4a36127ca92b59677@syzkaller.appspotmail.com
First crash: 184d, last: 1d19h

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
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] kernel BUG in insert_state_fast 0 (2) 2023/01/05 19:31
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 kernel BUG in insert_state_fast origin:upstream C 8 1d20h 51d 0/3 upstream: reported C repro on 2023/04/08 08:40

Sample crash report:
RDX: 0000000000000049 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007fff01480940 R08: 0000000000000001 R09: aaaaaaaaaaaa0102
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000007
R13: 00007fcb02fbd7bc R14: 0000000000000003 R15: 0000000000000001
 </TASK>
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:379!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5073 Comm: syz-executor152 Not tainted 6.3.0-rc3-syzkaller-00026-gfff5a5e7f528 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:set_state_bits fs/btrfs/extent-io-tree.c:379 [inline]
RIP: 0010:insert_state_fast+0x244/0x250 fs/btrfs/extent-io-tree.c:437
Code: 34 fe e9 77 ff ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 71 fe ff ff 4c 89 e7 e8 36 73 34 fe e9 64 fe ff ff e8 bc c1 de fd <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 55 41 57 41 56 41 55 41 54 53
RSP: 0018:ffffc90003c6f680 EFLAGS: 00010293
RAX: ffffffff83abab64 RBX: dffffc0000000000 RCX: ffff88807e813a80
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: 00000000fffffff4 R08: ffffffff83abaa85 R09: fffffbfff1a02ba3
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888029023588 R14: ffff888075f8d6c0 R15: 0000000000000800
FS:  0000555555f663c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa94486b000 CR3: 0000000078b45000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __set_extent_bit+0x1408/0x1ab0 fs/btrfs/extent-io-tree.c:1019
 set_record_extent_bits+0x56/0x90 fs/btrfs/extent-io-tree.c:1690
 qgroup_reserve_data+0x26e/0x8f0 fs/btrfs/qgroup.c:3777
 btrfs_qgroup_reserve_data+0x2e/0xc0 fs/btrfs/qgroup.c:3820
 btrfs_check_data_free_space+0x149/0x240 fs/btrfs/delalloc-space.c:154
 btrfs_buffered_write+0x5cf/0x1610 fs/btrfs/file.c:1253
 btrfs_direct_write fs/btrfs/file.c:1593 [inline]
 btrfs_do_write_iter+0xea6/0x1270 fs/btrfs/file.c:1674
 call_write_iter include/linux/fs.h:1851 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x7b2/0xbb0 fs/read_write.c:584
 ksys_write+0x1a0/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fcb02f43829
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:00007fff014808f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fcb02f43829
RDX: 0000000000000049 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007fff01480940 R08: 0000000000000001 R09: aaaaaaaaaaaa0102
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000007
R13: 00007fcb02fbd7bc R14: 0000000000000003 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:set_state_bits fs/btrfs/extent-io-tree.c:379 [inline]
RIP: 0010:insert_state_fast+0x244/0x250 fs/btrfs/extent-io-tree.c:437
Code: 34 fe e9 77 ff ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 71 fe ff ff 4c 89 e7 e8 36 73 34 fe e9 64 fe ff ff e8 bc c1 de fd <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 55 41 57 41 56 41 55 41 54 53
RSP: 0018:ffffc90003c6f680 EFLAGS: 00010293
RAX: ffffffff83abab64 RBX: dffffc0000000000 RCX: ffff88807e813a80
RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000
RBP: 00000000fffffff4 R08: ffffffff83abaa85 R09: fffffbfff1a02ba3
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888029023588 R14: ffff888075f8d6c0 R15: 0000000000000800
FS:  0000555555f663c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa94486b000 CR3: 0000000078b45000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (42):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2023/03/23 13:22 upstream fff5a5e7f528 f94b4a29 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in insert_state_fast
2023/03/20 06:28 upstream 5cdfdd6da323 7939252e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel BUG in insert_state_fast
2023/03/06 00:25 upstream f915322fe014 f8902b57 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in insert_state_fast
2023/01/09 16:36 upstream 1fe4fd6f5cad 1dac8c7a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in insert_state_fast
2022/11/27 02:48 upstream 644e9524388a f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in insert_state_fast
2022/11/25 21:57 upstream 08ad43d554ba f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in insert_state_fast
2023/05/27 23:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci eb0f1697d729 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/09 16:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ae87308093bc 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/05/22 22:29 upstream 44c026a73be8 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/05/18 14:43 upstream 4d6d4c7f541d 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/05/12 18:42 upstream cc3c44c9fda2 ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/05/07 20:53 upstream 17784de648be 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/04/15 14:40 upstream 7a934f4bd7d6 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/04/13 00:27 upstream 0bcc40255504 82d5e53e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/04/05 06:35 upstream 76f598ba7d8e 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/02/18 09:15 upstream 38f8ccde04a3 d02e9a70 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/02/13 01:09 upstream 711e9a4d52bf 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2022/12/14 01:46 upstream 02bf43c7b7f7 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2022/12/13 22:13 upstream 02bf43c7b7f7 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2022/12/13 19:39 upstream 764822972d64 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2022/11/25 20:58 upstream 08ad43d554ba f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in insert_state_fast
2023/05/21 07:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/04/30 15:04 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/04/27 16:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 6f5b1cc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/04/11 13:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9a03cbd79d3a 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/04/05 20:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 59caa87f9dfb 8b834965 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/03/20 10:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fe15c26ee26e 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/02/19 08:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2d3827b3f393 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/29 02:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c62c88e05937 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/28 06:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c62c88e05937 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/26 16:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e84eedb182e 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/20 15:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 559a440a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/19 19:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 1b826a2f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/06 04:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 247f34f7b803 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2023/01/05 08:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/28 02:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/27 01:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/25 05:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/21 04:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 d3e76707 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/19 03:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/18 19:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
2022/12/18 16:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in insert_state_fast
* Struck through repros no longer work on HEAD.