BUG: unable to handle kernel paging request in f2fs_get_dnode_of_data

5 views
Skip to first unread message

syzbot

unread,
Mar 4, 2023, 3:03:44 AM3/4/23
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=17a92604c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=55fbb83531987cfb9b8b
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+55fbb8...@syzkaller.appspotmail.com

loop1: rw=2049, want=57344, limit=40427
loop0: rw=2049, want=57344, limit=40427
attempt to access beyond end of device
loop0: rw=2049, want=50160, limit=40427
attempt to access beyond end of device
BUG: unable to handle kernel paging request at ffffed10967bb42e
loop1: rw=2049, want=53248, limit=40427
PGD 23fff3067 P4D 23fff3067 PUD 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 25264 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
RIP: 0010:datablock_addr fs/f2fs/f2fs.h:2163 [inline]
RIP: 0010:f2fs_get_dnode_of_data+0x7d8/0x2260 fs/f2fs/node.c:806
Code: fe 45 39 ee 0f 84 fd 13 00 00 e8 03 ca 46 fe e8 fe c9 46 fe 4a 8d 5c a5 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 d6
RSP: 0018:ffff8880461b7738 EFLAGS: 00010a07
RAX: dffffc0000000000 RBX: ffff8884b3dda174 RCX: ffffc900082c5000
RDX: 1ffff110967bb42e RSI: ffffffff831bbb72 RDI: 0000000000000001
RBP: ffff8880b41da168 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fff00003
R13: ffff8880b41da168 R14: 0000000000000000 R15: 0000000000000000
FS: 00007fd40aabb700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed10967bb42e CR3: 000000004442f000 CR4: 00000000003406e0
DR0: 0000000000002ef2 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__clone_blkaddrs fs/f2fs/file.c:1077 [inline]
__exchange_data_block+0x9bd/0x4820 fs/f2fs/file.c:1172
f2fs_move_file_range fs/f2fs/file.c:2458 [inline]
f2fs_ioc_move_range fs/f2fs/file.c:2509 [inline]
f2fs_ioctl+0x5048/0x83f0 fs/f2fs/file.c:2961
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
attempt to access beyond end of device
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
loop1: rw=2049, want=60112, limit=40427
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fd4135ac0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd40aabb168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fd4136cc050 RCX: 00007fd4135ac0f9
RDX: 0000000020000100 RSI: 00000000c020f509 RDI: 0000000000000004
RBP: 00007fd413607ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffd1f1e84f R14: 00007fd40aabb300 R15: 0000000000022000
Modules linked in:
CR2: ffffed10967bb42e
---[ end trace efa52aebac80a9e6 ]---
RIP: 0010:datablock_addr fs/f2fs/f2fs.h:2163 [inline]
RIP: 0010:f2fs_get_dnode_of_data+0x7d8/0x2260 fs/f2fs/node.c:806
Code: fe 45 39 ee 0f 84 fd 13 00 00 e8 03 ca 46 fe e8 fe c9 46 fe 4a 8d 5c a5 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 d6
RSP: 0018:ffff8880461b7738 EFLAGS: 00010a07
RAX: dffffc0000000000 RBX: ffff8884b3dda174 RCX: ffffc900082c5000
RDX: 1ffff110967bb42e RSI: ffffffff831bbb72 RDI: 0000000000000001
RBP: ffff8880b41da168 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fff00003
R13: ffff8880b41da168 R14: 0000000000000000 R15: 0000000000000000
FS: 00007fd40aabb700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed10967bb42e CR3: 000000004442f000 CR4: 00000000003406e0
DR0: 0000000000002ef2 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: fe 45 39 incb 0x39(%rbp)
3: ee out %al,(%dx)
4: 0f 84 fd 13 00 00 je 0x1407
a: e8 03 ca 46 fe callq 0xfe46ca12
f: e8 fe c9 46 fe callq 0xfe46ca12
14: 4a 8d 5c a5 00 lea 0x0(%rbp,%r12,4),%rbx
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 48 89 da mov %rbx,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx <-- trapping instruction
2e: 48 89 d8 mov %rbx,%rax
31: 83 e0 07 and $0x7,%eax
34: 83 c0 03 add $0x3,%eax
37: 38 d0 cmp %dl,%al
39: 7c 08 jl 0x43
3b: 84 d2 test %dl,%dl
3d: 0f .byte 0xf
3e: 85 d6 test %edx,%esi


---
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,
Mar 4, 2023, 3:19:54 AM3/4/23
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=11d481f2c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=55fbb83531987cfb9b8b
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1638e8a2c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=152f1598c80000
mounted in repro: https://storage.googleapis.com/syzbot-assets/570ed6e8a08e/mount_0.gz

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

loop0: rw=2049, want=73728, limit=40427
attempt to access beyond end of device
loop0: rw=2049, want=77824, limit=40427
attempt to access beyond end of device
loop0: rw=2049, want=85816, limit=40427
BUG: unable to handle kernel paging request at ffffed10948fe02e
PGD 23fff3067 P4D 23fff3067 PUD 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8140 Comm: syz-executor112 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
RIP: 0010:datablock_addr fs/f2fs/f2fs.h:2163 [inline]
RIP: 0010:f2fs_get_dnode_of_data+0x7d8/0x2260 fs/f2fs/node.c:806
Code: fe 45 39 ee 0f 84 fd 13 00 00 e8 03 ca 46 fe e8 fe c9 46 fe 4a 8d 5c a5 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 d6
RSP: 0018:ffff88809c38f738 EFLAGS: 00010a07
RAX: dffffc0000000000 RBX: ffff8884a47f0174 RCX: ffffffff831bcfba
RDX: 1ffff110948fe02e RSI: ffffffff831bbb72 RDI: 0000000000000001
RBP: ffff8880a4bf0168 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fff00003
R13: ffff8880a4bf0168 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f200c7cd700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed10948fe02e CR3: 00000000a3f74000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__clone_blkaddrs fs/f2fs/file.c:1077 [inline]
__exchange_data_block+0x9bd/0x4820 fs/f2fs/file.c:1172
f2fs_move_file_range fs/f2fs/file.c:2458 [inline]
f2fs_ioc_move_range fs/f2fs/file.c:2509 [inline]
f2fs_ioctl+0x5048/0x83f0 fs/f2fs/file.c:2961
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f2013884619
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f200c7cd2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f201390e7b0 RCX: 00007f2013884619
RDX: 0000000020000100 RSI: 00000000c020f509 RDI: 0000000000000004
RBP: 00007f20138db5a8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 0031656c69662f2e R14: f4ffffff00000000 R15: 00007f201390e7b8
Modules linked in:
CR2: ffffed10948fe02e
---[ end trace 64ce36341a1444c2 ]---
RIP: 0010:datablock_addr fs/f2fs/f2fs.h:2163 [inline]
RIP: 0010:f2fs_get_dnode_of_data+0x7d8/0x2260 fs/f2fs/node.c:806
Code: fe 45 39 ee 0f 84 fd 13 00 00 e8 03 ca 46 fe e8 fe c9 46 fe 4a 8d 5c a5 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 d6
RSP: 0018:ffff88809c38f738 EFLAGS: 00010a07
RAX: dffffc0000000000 RBX: ffff8884a47f0174 RCX: ffffffff831bcfba
RDX: 1ffff110948fe02e RSI: ffffffff831bbb72 RDI: 0000000000000001
RBP: ffff8880a4bf0168 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fff00003
R13: ffff8880a4bf0168 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f200c7cd700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed10948fe02e CR3: 00000000a3f74000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Reply all
Reply to author
Forward
0 new messages