general protection fault in f2fs_recover_fsync_data

7 views
Skip to first unread message

syzbot

unread,
Nov 6, 2022, 6:04:49 AM11/6/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=155a5739880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=60567f83d5c03f63ac6e
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz

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

device batadv0 left promiscuous mode
attempt to access beyond end of device
loop2: rw=8192, want=36920, limit=36912
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
CPU: 0 PID: 28824 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:142 [inline]
RIP: 0010:PageLocked include/linux/page-flags.h:272 [inline]
RIP: 0010:f2fs_put_page fs/f2fs/f2fs.h:2063 [inline]
RIP: 0010:find_fsync_dnodes fs/f2fs/recovery.c:344 [inline]
RIP: 0010:f2fs_recover_fsync_data+0x107e/0x7e50 fs/f2fs/recovery.c:707
Code: fe 48 83 3c 24 00 0f 84 c6 01 00 00 e8 fb c0 42 fe 48 8b 04 24 48 8d 68 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 1d 6a 00 00 4c 8b 24 24 31 ff 49 8b 5c 24 08 49
RSP: 0000:ffff88803bca7790 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffffb RCX: ffffc90007880000
RDX: 0000000000000000 RSI: ffffffff831fc475 RDI: 0000000000000007
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffffffffff000
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000008
R13: 00000000fffffffb R14: ffff88803f000780 R15: dffffc0000000000
FS: 00007fe2de37f700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc274c2b988 CR3: 00000000a4ef4000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
f2fs_fill_super+0x386f/0x7050 fs/f2fs/super.c:3113
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fe2dfe0dada
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe2de37ef88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007fe2dfe0dada
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fe2de37efe0
RBP: 00007fe2de37f020 R08: 00007fe2de37f020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 00007fe2de37efe0 R15: 0000000020000f00
Modules linked in:
---[ end trace 5e1ac588d98f2227 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:142 [inline]
RIP: 0010:PageLocked include/linux/page-flags.h:272 [inline]
RIP: 0010:f2fs_put_page fs/f2fs/f2fs.h:2063 [inline]
RIP: 0010:find_fsync_dnodes fs/f2fs/recovery.c:344 [inline]
RIP: 0010:f2fs_recover_fsync_data+0x107e/0x7e50 fs/f2fs/recovery.c:707
Code: fe 48 83 3c 24 00 0f 84 c6 01 00 00 e8 fb c0 42 fe 48 8b 04 24 48 8d 68 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 1d 6a 00 00 4c 8b 24 24 31 ff 49 8b 5c 24 08 49
RSP: 0000:ffff88803bca7790 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffffb RCX: ffffc90007880000
RDX: 0000000000000000 RSI: ffffffff831fc475 RDI: 0000000000000007
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffffffffff000
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000008
R13: 00000000fffffffb R14: ffff88803f000780 R15: dffffc0000000000
FS: 00007fe2de37f700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc274c2b988 CR3: 00000000a4ef4000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: fe 48 83 decb -0x7d(%rax)
3: 3c 24 cmp $0x24,%al
5: 00 0f add %cl,(%rdi)
7: 84 c6 test %al,%dh
9: 01 00 add %eax,(%rax)
b: 00 e8 add %ch,%al
d: fb sti
e: c0 42 fe 48 rolb $0x48,-0x2(%rdx)
12: 8b 04 24 mov (%rsp),%eax
15: 48 8d 68 08 lea 0x8(%rax),%rbp
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 48 89 ea mov %rbp,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 0f 85 1d 6a 00 00 jne 0x6a51
34: 4c 8b 24 24 mov (%rsp),%r12
38: 31 ff xor %edi,%edi
3a: 49 8b 5c 24 08 mov 0x8(%r12),%rbx
3f: 49 rex.WB


---
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

unread,
Nov 6, 2022, 6:23:36 AM11/6/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1256e396880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=60567f83d5c03f63ac6e
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=176a1f46880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c1e3fc880000
mounted in repro: https://storage.googleapis.com/syzbot-assets/2bbc9e57eef0/mount_0.gz

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

F2FS-fs (loop0): Found nat_bits in checkpoint
attempt to access beyond end of device
loop0: rw=8192, want=36920, limit=36912
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
CPU: 0 PID: 8108 Comm: syz-executor802 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:142 [inline]
RIP: 0010:PageLocked include/linux/page-flags.h:272 [inline]
RIP: 0010:f2fs_put_page fs/f2fs/f2fs.h:2063 [inline]
RIP: 0010:find_fsync_dnodes fs/f2fs/recovery.c:344 [inline]
RIP: 0010:f2fs_recover_fsync_data+0x107e/0x7e50 fs/f2fs/recovery.c:707
Code: fe 48 83 3c 24 00 0f 84 c6 01 00 00 e8 fb c0 42 fe 48 8b 04 24 48 8d 68 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 1d 6a 00 00 4c 8b 24 24 31 ff 49 8b 5c 24 08 49
RSP: 0018:ffff88809b8ff790 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffffb RCX: ffffffff831fb8c4
RDX: 0000000000000000 RSI: ffffffff831fc475 RDI: 0000000000000007
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffffffffff000
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000008
R13: 00000000fffffffb R14: ffff8880a309de40 R15: dffffc0000000000
FS: 0000555556fd8300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005634b46bd970 CR3: 00000000a5947000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
f2fs_fill_super+0x386f/0x7050 fs/f2fs/super.c:3113
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f7a200ababa
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff893e64a8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f7a200ababa
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fff893e64c0
RBP: 00007fff893e64c0 R08: 00007fff893e6500 R09: 0000555556fd82c0
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004
R13: 00007fff893e6500 R14: 000000000000003a R15: 0000000020000770
Modules linked in:
---[ end trace 53bd8f3a59322f76 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:142 [inline]
RIP: 0010:PageLocked include/linux/page-flags.h:272 [inline]
RIP: 0010:f2fs_put_page fs/f2fs/f2fs.h:2063 [inline]
RIP: 0010:find_fsync_dnodes fs/f2fs/recovery.c:344 [inline]
RIP: 0010:f2fs_recover_fsync_data+0x107e/0x7e50 fs/f2fs/recovery.c:707
Code: fe 48 83 3c 24 00 0f 84 c6 01 00 00 e8 fb c0 42 fe 48 8b 04 24 48 8d 68 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 1d 6a 00 00 4c 8b 24 24 31 ff 49 8b 5c 24 08 49
RSP: 0018:ffff88809b8ff790 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffffb RCX: ffffffff831fb8c4
RDX: 0000000000000000 RSI: ffffffff831fc475 RDI: 0000000000000007
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffffffffff000
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000008
R13: 00000000fffffffb R14: ffff8880a309de40 R15: dffffc0000000000
FS: 0000555556fd8300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005634b46bd970 CR3: 00000000a5947000 CR4: 00000000003406f0
Reply all
Reply to author
Forward
0 new messages