syzbot


general protection fault in check_init_srcu_struct

Status: upstream: reported on 2024/05/04 09:55
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+747508948da55ff287c2@syzkaller.appspotmail.com
First crash: 83d, last: 63d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] general protection fault in check_init_srcu_struct 0 (1) 2024/05/04 09:55

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000031: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000188-0x000000000000018f]
CPU: 3 PID: 9333 Comm: syz-executor.3 Not tainted 6.9.0-syzkaller-08544-g4b377b4868ef #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:check_init_srcu_struct+0x44/0x170 kernel/rcu/srcutree.c:408
Code: 53 48 89 fb 80 3c 02 00 0f 85 fe 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 38 48 8d bd 88 01 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ce 00 00 00 48 8b 85 88 01 00 00 a8 03 75 0b 5b
RSP: 0018:ffffc90003a373d0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff88805ba04240 RCX: ffffc900217c1000
RDX: 0000000000000031 RSI: 0000000000000000 RDI: 0000000000000188
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000006 R12: ffff88805ba04278
R13: ffff888032eb0b90 R14: 0000000000000000 R15: ffff88805ba00000
FS:  00007f17dd87a6c0(0000) GS:ffff88806b300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000206ae000 CR3: 000000004758e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 srcu_gp_start_if_needed+0x80/0xf00 kernel/rcu/srcutree.c:1221
 bkey_cached_free fs/bcachefs/btree_key_cache.c:90 [inline]
 bch2_btree_key_cache_scan+0xae0/0x1740 fs/bcachefs/btree_key_cache.c:893
 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435
 shrink_slab+0x18a/0x1310 mm/shrinker.c:662
 drop_slab_node mm/vmscan.c:393 [inline]
 drop_slab+0x14c/0x2c0 mm/vmscan.c:411
 drop_caches_sysctl_handler+0x171/0x190 fs/drop_caches.c:68
 proc_sys_call_handler+0x4cc/0x6f0 fs/proc/proc_sysctl.c:592
 call_write_iter include/linux/fs.h:2120 [inline]
 iter_file_splice_write+0x906/0x10b0 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x19b/0x6d0 fs/splice.c:1164
 splice_direct_to_actor+0x346/0xa40 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0x17e/0x250 fs/splice.c:1233
 do_sendfile+0xaa8/0xdb0 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1356 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x155/0x220 fs/read_write.c:1348
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f17dca7cee9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f17dd87a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f17dcbac050 RCX: 00007f17dca7cee9
RDX: 0000000020002080 RSI: 0000000000000005 RDI: 0000000000000006
RBP: 00007f17dcac949e R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000023b R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f17dcbac050 R15: 00007ffd864fe3c8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:check_init_srcu_struct+0x44/0x170 kernel/rcu/srcutree.c:408
Code: 53 48 89 fb 80 3c 02 00 0f 85 fe 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 38 48 8d bd 88 01 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ce 00 00 00 48 8b 85 88 01 00 00 a8 03 75 0b 5b
RSP: 0018:ffffc90003a373d0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff88805ba04240 RCX: ffffc900217c1000
RDX: 0000000000000031 RSI: 0000000000000000 RDI: 0000000000000188
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000006 R12: ffff88805ba04278
R13: ffff888032eb0b90 R14: 0000000000000000 R15: ffff88805ba00000
FS:  00007f17dd87a6c0(0000) GS:ffff88806b300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000206ae000 CR3: 000000004758e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	53                   	push   %rbx
   1:	48 89 fb             	mov    %rdi,%rbx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 fe 00 00 00    	jne    0x10c
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	48 8b 6b 38          	mov    0x38(%rbx),%rbp
  1c:	48 8d bd 88 01 00 00 	lea    0x188(%rbp),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 ce 00 00 00    	jne    0x102
  34:	48 8b 85 88 01 00 00 	mov    0x188(%rbp),%rax
  3b:	a8 03                	test   $0x3,%al
  3d:	75 0b                	jne    0x4a
  3f:	5b                   	pop    %rbx

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/18 13:30 upstream 4b377b4868ef c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in check_init_srcu_struct
2024/05/24 14:00 upstream 6d69b6c12fce c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/23 16:34 upstream c760b3725e52 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/23 09:46 upstream 5f16eb0549ab c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/23 08:27 upstream 5f16eb0549ab c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/23 03:21 upstream 5f16eb0549ab c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/22 21:59 upstream 29c73fc794c8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/22 21:23 upstream 29c73fc794c8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/22 20:19 upstream 29c73fc794c8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/22 15:08 upstream 29c73fc794c8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/21 18:59 upstream 8f6a15f095a6 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/21 00:13 upstream 6e51b4b5bbc0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/20 20:31 upstream 6e51b4b5bbc0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/17 22:21 upstream ff2632d7d08e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/17 02:17 upstream 3c999d1ae3c7 ad5321c6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/16 07:25 upstream 33e02dc69afb ef5d53ed .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
2024/05/04 06:16 upstream 3d25a941ea50 610f2a54 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in check_init_srcu_struct
* Struck through repros no longer work on HEAD.