kernel BUG in update_sit_entry

10 views
Skip to first unread message

syzbot

unread,
Nov 11, 2022, 5:12:44 AM11/11/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=16961285880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=c38ddf7fb5474fedb430
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+c38ddf...@syzkaller.appspotmail.com

F2FS-fs (loop5): Found nat_bits in checkpoint
F2FS-fs (loop5): Mounted with checkpoint version = 3e17dab1
9pnet: Insufficient options for proto=fd
F2FS-fs (loop5): Bitmap was wrongly cleared, blk:5835
------------[ cut here ]------------
kernel BUG at fs/f2fs/segment.c:2075!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 14981 Comm: kworker/u4:1 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: writeback wb_workfn (flush-7:5)
RIP: 0010:update_sit_entry+0x100a/0x1300 fs/f2fs/segment.c:2075
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 d7 02 00 00 48 8b 7d 00 44 89 f1 48 c7 c2 e0 4b a8 88 48 c7 c6 a0 4a a8 88 e8 06 7b f6 ff <0f> 0b 4c 89 ff e8 cc 60 7b fe e9 61 f1 ff ff 48 89 df e8 2f 60 7b
RSP: 0018:ffff8882111a7010 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8880a8fbeb90 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff83137d7e RDI: ffffed1042234dd4
RBP: ffff888050981240 R08: 0000000000000035 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000010
R13: 00000000ffffffff R14: 00000000000016cb R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f868da3f008 CR3: 000000020f8ec000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
f2fs_allocate_data_block+0x5f3/0x1e10 fs/f2fs/segment.c:2936
do_write_page+0x2de/0x670 fs/f2fs/segment.c:3003
f2fs_outplace_write_data+0x163/0x3c0 fs/f2fs/segment.c:3066
f2fs_do_write_data_page+0x1761/0x2950 fs/f2fs/data.c:1838
__write_data_page+0x1eaf/0x22d0 fs/f2fs/data.c:1920
f2fs_write_cache_pages+0x96e/0x13e0 fs/f2fs/data.c:2107
__f2fs_write_data_pages fs/f2fs/data.c:2217 [inline]
f2fs_write_data_pages+0xcc3/0x1060 fs/f2fs/data.c:2244
do_writepages+0xe5/0x290 mm/page-writeback.c:2344
__writeback_single_inode+0x10c/0x11d0 fs/fs-writeback.c:1385
writeback_sb_inodes+0x537/0xef0 fs/fs-writeback.c:1647
wb_writeback+0x28d/0xcc0 fs/fs-writeback.c:1820
wb_do_writeback fs/fs-writeback.c:1965 [inline]
wb_workfn+0x29b/0x1250 fs/fs-writeback.c:2006
process_one_work+0x864/0x1570 kernel/workqueue.c:2153
worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Modules linked in:
---[ end trace 6f22d5125fd2bdb8 ]---
RIP: 0010:update_sit_entry+0x100a/0x1300 fs/f2fs/segment.c:2075
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 d7 02 00 00 48 8b 7d 00 44 89 f1 48 c7 c2 e0 4b a8 88 48 c7 c6 a0 4a a8 88 e8 06 7b f6 ff <0f> 0b 4c 89 ff e8 cc 60 7b fe e9 61 f1 ff ff 48 89 df e8 2f 60 7b
RSP: 0018:ffff8882111a7010 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8880a8fbeb90 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff83137d7e RDI: ffffed1042234dd4
RBP: ffff888050981240 R08: 0000000000000035 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000010
R13: 00000000ffffffff R14: 00000000000016cb R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2493e8d38 CR3: 00000002193fb000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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 11, 2022, 5:38:46 AM11/11/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=15701d3e880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=c38ddf7fb5474fedb430
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=175ef615880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=171c96b9880000
mounted in repro: https://storage.googleapis.com/syzbot-assets/4988d70f94f0/mount_0.gz

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

F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): Mounted with checkpoint version = 3e17dab1
F2FS-fs (loop0): Bitmap was wrongly cleared, blk:5835
------------[ cut here ]------------
kernel BUG at fs/f2fs/segment.c:2075!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8100 Comm: syz-executor153 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:update_sit_entry+0x100a/0x1300 fs/f2fs/segment.c:2075
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 d7 02 00 00 48 8b 7d 00 44 89 f1 48 c7 c2 e0 4b a8 88 48 c7 c6 a0 4a a8 88 e8 06 7b f6 ff <0f> 0b 4c 89 ff e8 cc 60 7b fe e9 61 f1 ff ff 48 89 df e8 2f 60 7b
RSP: 0018:ffff888091bcee10 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8880b28d36d0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff83137d7e RDI: ffffed1012379d94
RBP: ffff88809529c1c0 R08: 0000000000000035 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000010
R13: 00000000ffffffff R14: 00000000000016cb R15: 0000000000000000
FS: 0000555555ac7300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9e847051d0 CR3: 00000000a47be000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
f2fs_allocate_data_block+0x5f3/0x1e10 fs/f2fs/segment.c:2936
do_write_page+0x2de/0x670 fs/f2fs/segment.c:3003
f2fs_outplace_write_data+0x163/0x3c0 fs/f2fs/segment.c:3066
f2fs_do_write_data_page+0x1761/0x2950 fs/f2fs/data.c:1838
__write_data_page+0x1eaf/0x22d0 fs/f2fs/data.c:1920
f2fs_write_cache_pages+0x96e/0x13e0 fs/f2fs/data.c:2107
__f2fs_write_data_pages fs/f2fs/data.c:2217 [inline]
f2fs_write_data_pages+0xcc3/0x1060 fs/f2fs/data.c:2244
do_writepages+0xe5/0x290 mm/page-writeback.c:2344
__filemap_fdatawrite_range+0x27d/0x350 mm/filemap.c:446
f2fs_sync_dirty_inodes+0x220/0xdf0 fs/f2fs/checkpoint.c:1034
block_operations+0x149/0x7d0 fs/f2fs/checkpoint.c:1121
f2fs_write_checkpoint+0x2d3/0x5050 fs/f2fs/checkpoint.c:1480
kill_f2fs_super+0x2b6/0x330 fs/f2fs/super.c:3251
deactivate_locked_super+0x94/0x160 fs/super.c:329
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0xbf3/0x2be0 kernel/exit.c:870
do_group_exit+0x125/0x310 kernel/exit.c:967
__do_sys_exit_group kernel/exit.c:978 [inline]
__se_sys_exit_group kernel/exit.c:976 [inline]
__x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f9e8468dbd9
Code: Bad RIP value.
RSP: 002b:00007fff2b607b38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f9e84704330 RCX: 00007f9e8468dbd9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 00007f9e846fee40
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9e84704330
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace 40a3576fab1a9e37 ]---
RIP: 0010:update_sit_entry+0x100a/0x1300 fs/f2fs/segment.c:2075
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 d7 02 00 00 48 8b 7d 00 44 89 f1 48 c7 c2 e0 4b a8 88 48 c7 c6 a0 4a a8 88 e8 06 7b f6 ff <0f> 0b 4c 89 ff e8 cc 60 7b fe e9 61 f1 ff ff 48 89 df e8 2f 60 7b
RSP: 0018:ffff888091bcee10 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8880b28d36d0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff83137d7e RDI: ffffed1012379d94
RBP: ffff88809529c1c0 R08: 0000000000000035 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000010
R13: 00000000ffffffff R14: 00000000000016cb R15: 0000000000000000
FS: 0000555555ac7300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9e8468dbaf CR3: 00000000a47be000 CR4: 00000000003406f0
Reply all
Reply to author
Forward
0 new messages