syzbot


kernel BUG in btrfs_rmap_block

Status: upstream: reported C repro on 2023/02/16 18:55
Reported-by: syzbot+e4391649e78c5b8f2d7f@syzkaller.appspotmail.com
First crash: 485d, last: 485d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 kernel BUG in btrfs_rmap_block C 1 485d 485d 0/1 upstream: reported C repro on 2023/02/16 19:35

Sample crash report:
RDX: 0000000000000390 RSI: 0000000002007ffb RDI: 0000000000000004
RBP: 00007ffd39821390 R08: 0000000000000002 R09: 0000000000003131
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007fbe9e3990e8 R14: 0000000000000000 R15: 0000000000000000
------------[ cut here ]------------
kernel BUG at fs/btrfs/volumes.c:5965!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7985 Comm: syz-executor224 Not tainted 4.14.305-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
task: ffff888096ef2340 task.stack: ffff888091a70000
RIP: 0010:btrfs_rmap_block+0x61a/0x750 fs/btrfs/volumes.c:5965
RSP: 0018:ffff888091a77650 EFLAGS: 00010297
RAX: ffff888096ef2340 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000286
RBP: ffff888097bc0e80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000005
R13: 0000000000000000 R14: ffff8880b3aa6040 R15: 00000000007e0000
FS:  000055555726d3c0(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b8b894f8e0 CR3: 00000000b05bb000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 exclude_super_stripes+0x102/0x480 fs/btrfs/extent-tree.c:280
 btrfs_make_block_group+0x288/0x950 fs/btrfs/extent-tree.c:10422
 __btrfs_alloc_chunk+0x1194/0x18e0 fs/btrfs/volumes.c:4850
 do_chunk_alloc+0x2fa/0x800 fs/btrfs/extent-tree.c:4707
 btrfs_alloc_data_chunk_ondemand+0x2de/0xc50 fs/btrfs/extent-tree.c:4338
 btrfs_check_data_free_space+0xc4/0x130 fs/btrfs/extent-tree.c:4422
 btrfs_delalloc_reserve_space+0x2a/0xa0 fs/btrfs/extent-tree.c:6291
 btrfs_truncate_block+0x1c0/0xda0 fs/btrfs/inode.c:4911
 btrfs_cont_expand+0x15c/0xc70 fs/btrfs/inode.c:5070
 btrfs_setsize fs/btrfs/inode.c:5188 [inline]
 btrfs_setattr+0x407/0x870 fs/btrfs/inode.c:5295
 notify_change+0x56b/0xd10 fs/attr.c:315
 do_truncate+0xff/0x1a0 fs/open.c:63
 do_sys_ftruncate.constprop.0+0x3a3/0x480 fs/open.c:205
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fbe9e35d109
RSP: 002b:00007ffd39821388 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007ffd398213c8 RCX: 00007fbe9e35d109
RDX: 0000000000000390 RSI: 0000000002007ffb RDI: 0000000000000004
RBP: 00007ffd39821390 R08: 0000000000000002 R09: 0000000000003131
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007fbe9e3990e8 R14: 0000000000000000 R15: 0000000000000000
Code: 0f af 64 24 38 4c 89 64 24 38 e9 5f fb ff ff e8 4d e0 ad fe 0f 0b e9 7e fd ff ff 41 bc fb ff ff ff e9 d9 fe ff ff e8 36 e0 ad fe <0f> 0b e8 2f e0 ad fe 44 8d 63 fe 48 8b 44 24 20 44 89 e1 31 d2 
RIP: btrfs_rmap_block+0x61a/0x750 fs/btrfs/volumes.c:5965 RSP: ffff888091a77650
---[ end trace 232f6eecee309a2e ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/16 19:07 linux-4.14.y a8ad60f2af58 38b317a7 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 kernel BUG in btrfs_rmap_block
2023/02/16 18:55 linux-4.14.y a8ad60f2af58 38b317a7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 kernel BUG in btrfs_rmap_block
* Struck through repros no longer work on HEAD.