syzbot


general protection fault in btrfs_lookup_csums_list

Status: upstream: reported on 2024/09/12 09:23
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+d60477667a2941dfc89f@syzkaller.appspotmail.com
First crash: 33d, last: 12d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] general protection fault in btrfs_lookup_csums_list 0 (1) 2024/09/12 09:23

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000041: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000208-0x000000000000020f]
CPU: 0 UID: 0 PID: 5110 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-08481-g88264981f208 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:btrfs_lookup_csums_list+0xb4/0x1670 fs/btrfs/file-item.c:470
Code: 29 48 89 4c 24 70 42 c7 44 29 08 f3 f3 f3 f3 e8 e2 f4 e2 fd 48 89 9c 24 d0 00 00 00 48 81 c3 08 02 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 fd 4d 4c fe 48 8b 03 48 89 44 24
RSP: 0000:ffffc90002eb6660 EFLAGS: 00010206
RAX: 0000000000000041 RBX: 0000000000000208 RCX: 0000000000040000
RDX: ffffc9000bc01000 RSI: 0000000000000a8c RDI: 0000000000000a8d
RBP: ffffc90002eb6808 R08: 0000000000000000 R09: 1ffff1100989080d
R10: dffffc0000000000 R11: ffffed100989080e R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888040540208
FS:  00007f8ffee1e6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002003d000 CR3: 0000000011f16000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 can_nocow_file_extent+0x808/0xa40 fs/btrfs/inode.c:1989
 run_delalloc_nocow+0x9bc/0x11e0 fs/btrfs/inode.c:2139
 btrfs_run_delalloc_range+0x31d/0xf70 fs/btrfs/inode.c:2321
 writepage_delalloc+0x482/0x7d0 fs/btrfs/extent_io.c:1192
 extent_writepage fs/btrfs/extent_io.c:1454 [inline]
 extent_write_cache_pages fs/btrfs/extent_io.c:2130 [inline]
 btrfs_writepages+0x1157/0x2370 fs/btrfs/extent_io.c:2261
 do_writepages+0x35d/0x870 mm/page-writeback.c:2683
 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:398
 __filemap_fdatawrite_range mm/filemap.c:431 [inline]
 filemap_write_and_wait_range mm/filemap.c:685 [inline]
 filemap_invalidate_pages+0x1f1/0x330 mm/filemap.c:2741
 __iomap_dio_rw+0xb96/0x2370 fs/iomap/direct-io.c:657
 btrfs_dio_write fs/btrfs/direct-io.c:775 [inline]
 btrfs_direct_write+0x61b/0xa70 fs/btrfs/direct-io.c:880
 btrfs_do_write_iter+0x2a0/0x760 fs/btrfs/file.c:1505
 do_iter_readv_writev+0x600/0x880
 vfs_writev+0x376/0xba0 fs/read_write.c:1064
 do_pwritev fs/read_write.c:1165 [inline]
 __do_sys_pwritev2 fs/read_write.c:1224 [inline]
 __se_sys_pwritev2+0x1ca/0x2d0 fs/read_write.c:1215
 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:0x7f8ffdf7def9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8ffee1e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007f8ffe136058 RCX: 00007f8ffdf7def9
RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000009
RBP: 00007f8ffdff0b76 R08: 0000000000000000 R09: 0000000000000003
R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f8ffe136058 R15: 00007ffd07f40218
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_lookup_csums_list+0xb4/0x1670 fs/btrfs/file-item.c:470
Code: 29 48 89 4c 24 70 42 c7 44 29 08 f3 f3 f3 f3 e8 e2 f4 e2 fd 48 89 9c 24 d0 00 00 00 48 81 c3 08 02 00 00 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 fd 4d 4c fe 48 8b 03 48 89 44 24
RSP: 0000:ffffc90002eb6660 EFLAGS: 00010206
RAX: 0000000000000041 RBX: 0000000000000208 RCX: 0000000000040000
RDX: ffffc9000bc01000 RSI: 0000000000000a8c RDI: 0000000000000a8d
RBP: ffffc90002eb6808 R08: 0000000000000000 R09: 1ffff1100989080d
R10: dffffc0000000000 R11: ffffed100989080e R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888040540208
FS:  00007f8ffee1e6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002004b000 CR3: 0000000011f16000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	29 48 89             	sub    %ecx,-0x77(%rax)
   3:	4c 24 70             	rex.WR and $0x70,%al
   6:	42 c7 44 29 08 f3 f3 	movl   $0xf3f3f3f3,0x8(%rcx,%r13,1)
   d:	f3 f3
   f:	e8 e2 f4 e2 fd       	call   0xfde2f4f6
  14:	48 89 9c 24 d0 00 00 	mov    %rbx,0xd0(%rsp)
  1b:	00
  1c:	48 81 c3 08 02 00 00 	add    $0x208,%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 fd 4d 4c fe       	call   0xfe4c4e36
  39:	48 8b 03             	mov    (%rbx),%rax
  3c:	48                   	rex.W
  3d:	89                   	.byte 0x89
  3e:	44                   	rex.R
  3f:	24                   	.byte 0x24

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/22 17:03 upstream 88264981f208 6f888b75 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_lookup_csums_list
2024/09/06 21:58 upstream b831f83e40a2 ce70880a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_lookup_csums_list
2024/09/02 00:31 upstream 431c1646e1f8 1eda0d14 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in btrfs_lookup_csums_list
* Struck through repros no longer work on HEAD.