syzbot


general protection fault in nilfs_btree_insert

Status: upstream: reported C repro on 2022/12/31 23:33
Subsystems: nilfs2
[Documentation on labels]
Reported-by: syzbot+70425cadb36da07d5fc4@syzkaller.appspotmail.com
First crash: 720d, last: 657d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in nilfs_btree_insert nilfs C error 2 726d 723d 22/28 fixed on 2023/06/08 14:41
upstream general protection fault in nilfs_btree_insert (2) nilfs C inconclusive 1 100d 110d 28/28 fixed on 2024/10/22 11:57
linux-5.15 BUG: unable to handle kernel paging request in nilfs_btree_insert C error 3 116d 117d 0/3 auto-obsoleted due to no activity on 2024/12/04 13:11
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/03/04 22:03 21m bisect fix linux-4.14.y OK (0) job log log
2023/02/02 19:30 41m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 7978 Comm: syz-executor290 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
task: ffff8880ab7c6640 task.stack: ffff8880924b8000
RIP: 0010:nilfs_btree_get_nonroot_node fs/nilfs2/btree.c:427 [inline]
RIP: 0010:nilfs_btree_prepare_insert fs/nilfs2/btree.c:1087 [inline]
RIP: 0010:nilfs_btree_insert+0x4e8/0x1960 fs/nilfs2/btree.c:1248
RSP: 0018:ffff8880924bf680 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000028
RBP: dffffc0000000000 R08: ffffffff8b9a7040 R09: 0000000000000005
R10: 0000000000000000 R11: ffff8880ab7c6640 R12: 0000000000000000
R13: 0000000000000003 R14: 0000000000000000 R15: ffff8880a1a81878
FS:  0000555557325300(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558bc38691e0 CR3: 00000000a45ea000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 nilfs_bmap_do_insert fs/nilfs2/bmap.c:130 [inline]
 nilfs_bmap_insert+0x21b/0x380 fs/nilfs2/bmap.c:156
 nilfs_get_block+0x434/0x7a0 fs/nilfs2/inode.c:109
 __block_write_begin_int+0x35c/0x11d0 fs/buffer.c:2038
 __block_write_begin fs/buffer.c:2088 [inline]
 block_write_begin+0x58/0x270 fs/buffer.c:2147
 nilfs_write_begin+0x95/0x1c0 fs/nilfs2/inode.c:280
 generic_perform_write+0x1d5/0x430 mm/filemap.c:3055
 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3180
 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3208
 call_write_iter include/linux/fs.h:1780 [inline]
 new_sync_write fs/read_write.c:469 [inline]
 __vfs_write+0x44c/0x630 fs/read_write.c:482
 vfs_write+0x17f/0x4d0 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xf2/0x210 fs/read_write.c:582
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f0c80a8bb79
RSP: 002b:00007fff0cc1a5c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0c80a8bb79
RDX: 000000000000002f RSI: 0000000020000040 RDI: 0000000000000004
RBP: 00007f0c80a4b180 R08: 0000000000000014 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0c80a4b210
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Code: df 9d e7 fe 49 8d 47 c8 48 89 44 24 30 48 c1 e8 03 80 3c 28 00 0f 85 0c 11 00 00 4d 8b 67 c8 49 8d 7c 24 28 48 89 f8 48 c1 e8 03 <80> 3c 28 00 0f 85 9d 10 00 00 4d 8b 64 24 28 49 8d 7c 24 02 48 
RIP: nilfs_btree_get_nonroot_node fs/nilfs2/btree.c:427 [inline] RSP: ffff8880924bf680
RIP: nilfs_btree_prepare_insert fs/nilfs2/btree.c:1087 [inline] RSP: ffff8880924bf680
RIP: nilfs_btree_insert+0x4e8/0x1960 fs/nilfs2/btree.c:1248 RSP: ffff8880924bf680
---[ end trace c8792a66f25c4d36 ]---
----------------
Code disassembly (best guess):
   0:	df 9d e7 fe 49 8d    	fistps -0x72b60119(%rbp)
   6:	47 c8 48 89 44       	rex.RXB enterq $0x8948,$0x44
   b:	24 30                	and    $0x30,%al
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	0f 85 0c 11 00 00    	jne    0x1127
  1b:	4d 8b 67 c8          	mov    -0x38(%r15),%r12
  1f:	49 8d 7c 24 28       	lea    0x28(%r12),%rdi
  24:	48 89 f8             	mov    %rdi,%rax
  27:	48 c1 e8 03          	shr    $0x3,%rax
* 2b:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2f:	0f 85 9d 10 00 00    	jne    0x10d2
  35:	4d 8b 64 24 28       	mov    0x28(%r12),%r12
  3a:	49 8d 7c 24 02       	lea    0x2(%r12),%rdi
  3f:	48                   	rex.W

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/31 23:33 linux-4.14.y c4215ee4771b ab32d508 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 general protection fault in nilfs_btree_insert
* Struck through repros no longer work on HEAD.