syzbot


KASAN: null-ptr-deref Write in kill_f2fs_super

Status: upstream: reported C repro on 2022/10/13 07:54
Reported-by: syzbot+729c925c2d9fc495ddee@syzkaller.appspotmail.com
Fix commit: 91586ce0d39a f2fs: fix to invalidate dcc->f2fs_issue_discard in error path
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak 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 ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 117d, last: 95d

Cause bisection: failed (bisect log)

Sample crash report:
loop0: detected capacity change from 0 to 264192
F2FS-fs (loop0): invalid crc_offset: 0
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): Mounted with checkpoint version = 3651456e
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: null-ptr-deref in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline]
BUG: KASAN: null-ptr-deref in __refcount_add include/linux/refcount.h:193 [inline]
BUG: KASAN: null-ptr-deref in __refcount_inc include/linux/refcount.h:250 [inline]
BUG: KASAN: null-ptr-deref in refcount_inc include/linux/refcount.h:267 [inline]
BUG: KASAN: null-ptr-deref in get_task_struct include/linux/sched/task.h:110 [inline]
BUG: KASAN: null-ptr-deref in kthread_stop+0x2a/0x210 kernel/kthread.c:703
Write of size 4 at addr 000000000000001c by task syz-executor364/3613

CPU: 1 PID: 3613 Comm: syz-executor364 Not tainted 6.0.0-syzkaller-09423-g493ffd6605b2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
 print_report+0xf1/0x1f0 mm/kasan/report.c:436
 kasan_report+0xc3/0xf0 mm/kasan/report.c:495
 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline]
 __refcount_add include/linux/refcount.h:193 [inline]
 __refcount_inc include/linux/refcount.h:250 [inline]
 refcount_inc include/linux/refcount.h:267 [inline]
 get_task_struct include/linux/sched/task.h:110 [inline]
 kthread_stop+0x2a/0x210 kernel/kthread.c:703
 kill_f2fs_super+0xe6/0x3c0 fs/f2fs/super.c:4522
 deactivate_locked_super+0xa7/0xf0 fs/super.c:331
 cleanup_mnt+0x4ce/0x560 fs/namespace.c:1186
 task_work_run+0x146/0x1c0 kernel/task_work.c:177
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x6b2/0x2280 kernel/exit.c:813
 do_group_exit+0x1fd/0x2b0 kernel/exit.c:943
 __do_sys_exit_group kernel/exit.c:954 [inline]
 __se_sys_exit_group kernel/exit.c:952 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:952
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8264e76359
Code: Unable to access opcode bytes at 0x7f8264e7632f.
RSP: 002b:00007fffe8489448 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f8264eee410 RCX: 00007f8264e76359
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000000180020 R11: 0000000000000246 R12: 00007f8264eee410
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>
==================================================================

Crashes (49):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-fs 2022/10/13 07:11 upstream 493ffd6605b2 3f6b40a1 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 06:36 upstream 493ffd6605b2 3f6b40a1 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/11/03 10:38 upstream b229b6ca5abb 7a2ebf95 .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/11/02 11:12 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/27 01:42 upstream 4dc12f37a8e9 86777b7f .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci-upstream-kasan-gce-smack-root 2022/10/26 13:54 upstream 4dc12f37a8e9 2159e4d2 .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/26 10:08 upstream 1a2dcbdde82e 2159e4d2 .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/26 03:20 upstream 1a2dcbdde82e 2159e4d2 .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/25 21:35 upstream 337a0a0b63f1 45645420 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/25 19:55 upstream 337a0a0b63f1 45645420 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci-upstream-kasan-gce-smack-root 2022/10/25 10:51 upstream a970174d7a10 45645420 .config console log report info [disk image] [vmlinux] [kernel image] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/25 05:25 upstream 337a0a0b63f1 45645420 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/24 23:28 upstream 247f34f7b803 faae2fda .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/23 18:35 upstream d47136c28015 23bf86af .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci-upstream-kasan-gce-smack-root 2022/10/22 10:32 upstream 4da34b7d175d c0b80a55 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/21 09:35 upstream 6d36c728bc2e 63e790dd .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/21 01:11 upstream 493ffd6605b2 a0fd4dab .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci-upstream-kasan-gce-smack-root 2022/10/20 16:58 upstream 55be6084c8e0 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/20 14:09 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/20 07:27 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 23:10 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 21:48 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 18:37 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 07:35 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 06:26 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 05:15 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/19 02:05 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/18 04:11 upstream 493ffd6605b2 94744d21 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/18 01:16 upstream 493ffd6605b2 94744d21 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/17 23:49 upstream 493ffd6605b2 94744d21 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/16 01:53 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/16 01:01 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/15 11:59 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/15 10:29 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/15 09:25 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/15 01:40 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/14 19:39 upstream 493ffd6605b2 4954e4b2 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/14 16:02 upstream 493ffd6605b2 4954e4b2 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/14 15:20 upstream 493ffd6605b2 4954e4b2 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 14:11 upstream 493ffd6605b2 adf90437 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 09:22 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 08:58 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 06:40 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 06:23 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/13 05:53 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/12 23:53 upstream 493ffd6605b2 16a9c9e0 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/12 21:52 upstream 493ffd6605b2 16a9c9e0 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci-upstream-kasan-gce-smack-root 2022/10/12 21:41 upstream 55be6084c8e0 89b5a509 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
ci2-upstream-fs 2022/10/12 21:18 upstream 493ffd6605b2 16a9c9e0 .config console log report info [disk image] [vmlinux] KASAN: null-ptr-deref Write in kill_f2fs_super
* Struck through repros no longer work on HEAD.