syzbot


kernel BUG in f2fs_abort_atomic_write

Status: upstream: reported syz repro on 2023/01/02 10:01
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+9b7be0f1263ed2dbfbba@syzkaller.appspotmail.com
Fix commit: f2fs: fix to avoid race condition of f2fs_abort_atomic_write()
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-net-next-test-gce ci2-upstream-usb]
First crash: 537d, last: 486d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [f2fs?] kernel BUG in f2fs_abort_atomic_write 0 (2) 2023/02/15 20:15
[PATCH 1/5] f2fs: introduce trace_f2fs_replace_atomic_write_block 7 (7) 2023/01/31 19:10

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/inode.c:1763!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5237 Comm: syz-executor.0 Not tainted 6.2.0-rc8-syzkaller-00021-ge1c04510f521 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:iput+0x68/0x80 fs/inode.c:1763
Code: ff 83 e3 40 48 89 de e8 b6 b6 9b ff 48 85 db 75 14 e8 dc b9 9b ff 48 89 ef e8 24 f7 ff ff 5b 5d e9 cd b9 9b ff e8 c8 b9 9b ff <0f> 0b e8 31 cd e9 ff eb c5 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f
RSP: 0018:ffffc90004ddfbe0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000040 RCX: 0000000000000000
RDX: ffff88801e0f9d40 RSI: ffffffff81e54e48 RDI: 0000000000000007
RBP: ffff888072e68000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000040 R11: 0000000000000000 R12: ffff888072e278e0
R13: 0000000000000000 R14: ffff888072e68000 R15: 0000000000000000
FS:  00007f2cbc74c700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2cb2b58000 CR3: 0000000027d2f000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 f2fs_abort_atomic_write+0xea/0x4f0 fs/f2fs/segment.c:196
 f2fs_ioc_commit_atomic_write+0x19f/0x260 fs/f2fs/file.c:2157
 __f2fs_ioctl+0x26f0/0xaaf0 fs/f2fs/file.c:4154
 f2fs_ioctl+0x18e/0x220 fs/f2fs/file.c:4242
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f2cbba8c0f9
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:00007f2cbc74c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2cbbbac050 RCX: 00007f2cbba8c0f9
RDX: 0000000000000000 RSI: 000000000000f502 RDI: 0000000000000004
RBP: 00007f2cbbae7ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffc60048ef R14: 00007f2cbc74c300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:iput+0x68/0x80 fs/inode.c:1763
Code: ff 83 e3 40 48 89 de e8 b6 b6 9b ff 48 85 db 75 14 e8 dc b9 9b ff 48 89 ef e8 24 f7 ff ff 5b 5d e9 cd b9 9b ff e8 c8 b9 9b ff <0f> 0b e8 31 cd e9 ff eb c5 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f
RSP: 0018:ffffc90004ddfbe0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000040 RCX: 0000000000000000
RDX: ffff88801e0f9d40 RSI: ffffffff81e54e48 RDI: 0000000000000007
RBP: ffff888072e68000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000040 R11: 0000000000000000 R12: ffff888072e278e0
R13: 0000000000000000 R14: ffff888072e68000 R15: 0000000000000000
FS:  00007f2cbc74c700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2cbc74c718 CR3: 0000000027d2f000 CR4: 0000000000350ee0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/15 20:15 upstream e1c04510f521 6be0f1f5 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in f2fs_abort_atomic_write
2022/12/26 22:39 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in f2fs_abort_atomic_write
* Struck through repros no longer work on HEAD.