[nilfs2?] general protection fault in nilfs_btree_insert

5 views
Skip to first unread message

syzbot

unread,
Dec 31, 2022, 6:33:47 PM12/31/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c4215ee4771b Linux 4.14.302
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1311a212480000
kernel config: https://syzkaller.appspot.com/x/.config?x=4a9988fe055c9527
dashboard link: https://syzkaller.appspot.com/bug?extid=70425cadb36da07d5fc4
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13733cac480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11b7215c480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c93ba055d204/disk-c4215ee4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bfbc929a33c1/vmlinux-c4215ee4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/444658051770/bzImage-c4215ee4.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/72dae58e58e4/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+70425c...@syzkaller.appspotmail.com

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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages