syzbot


kernel BUG in update_sit_entry

Status: upstream: reported C repro on 2022/11/11 10:12
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+c38ddf7fb5474fedb430@syzkaller.appspotmail.com
First crash: 529d, last: 429d

Sample crash report:
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
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/11 10:37 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 kernel BUG in update_sit_entry
2023/02/19 09:48 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
2023/02/18 01:28 linux-4.19.y 3f8a27f9e27b cf8c2d39 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
2023/01/30 21:16 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
2022/12/31 14:26 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
2022/12/26 10:37 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
2022/11/11 17:07 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
2022/11/11 10:12 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 kernel BUG in update_sit_entry
* Struck through repros no longer work on HEAD.