================================================================== 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:111 [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:105 [inline] BUG: KASAN: null-ptr-deref in kthread_stop+0x36/0x3c0 kernel/kthread.c:644 Write of size 4 at addr 0000000000000024 by task syz-executor.4/622 CPU: 0 PID: 622 Comm: syz-executor.4 Not tainted 5.15.81-syzkaller-01226-gd753150bdc01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 __kasan_report mm/kasan/report.c:439 [inline] kasan_report+0x19c/0x1f0 mm/kasan/report.c:452 kasan_check_range+0x2aa/0x2e0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:111 [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:105 [inline] kthread_stop+0x36/0x3c0 kernel/kthread.c:644 f2fs_stop_discard_thread+0xa1/0xc0 fs/f2fs/segment.c:1760 kill_f2fs_super+0xe0/0x3c0 fs/f2fs/super.c:4572 deactivate_locked_super+0xb0/0x100 fs/super.c:335 deactivate_super+0xa5/0xd0 fs/super.c:366 cleanup_mnt+0x45f/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x147/0x1b0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xfd/0x110 kernel/entry/common.c:175 exit_to_user_mode_prepare kernel/entry/common.c:207 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x79/0xc0 kernel/entry/common.c:300 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fb409e9e537 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 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:00007ffd0661dac8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fb409e9e537 RDX: 00007ffd0661db9c RSI: 000000000000000a RDI: 00007ffd0661db90 RBP: 00007ffd0661db90 R08: 00000000ffffffff R09: 00007ffd0661d960 R10: 0000555556e46793 R11: 0000000000000246 R12: 00007fb409ef7b24 R13: 00007ffd0661ec50 R14: 0000555556e466f0 R15: 00007ffd0661ec90 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000024 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 164b91067 P4D 164b91067 PUD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 622 Comm: syz-executor.4 Tainted: G B 5.15.81-syzkaller-01226-gd753150bdc01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 RIP: 0010:atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:112 [inline] RIP: 0010:__refcount_add include/linux/refcount.h:193 [inline] RIP: 0010:__refcount_inc include/linux/refcount.h:250 [inline] RIP: 0010:refcount_inc include/linux/refcount.h:267 [inline] RIP: 0010:get_task_struct include/linux/sched/task.h:105 [inline] RIP: 0010:kthread_stop+0x3b/0x3c0 kernel/kthread.c:644 Code: bd 00 00 00 00 00 fc ff df e8 11 9e 26 00 0f 1f 44 00 00 4d 8d 74 24 28 4c 89 f7 be 04 00 00 00 e8 4a 72 69 00 bb 01 00 00 00 41 0f c1 5c 24 28 31 ff 89 de e8 55 a2 26 00 85 db 0f 84 33 01 RSP: 0018:ffffc90005157c58 EFLAGS: 00010246 RAX: ffff88810cd1a700 RBX: 0000000000000001 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000292 RDI: 0000000000000001 RBP: ffffc90005157c80 R08: ffffffff81434253 R09: fffffbfff0e502f9 R10: fffffbfff0e502f9 R11: 1ffffffff0e502f8 R12: fffffffffffffffc R13: dffffc0000000000 R14: 0000000000000024 R15: dffffc0000000000 FS: 0000555556e45400(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 00000001612d3000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: f2fs_stop_discard_thread+0xa1/0xc0 fs/f2fs/segment.c:1760 kill_f2fs_super+0xe0/0x3c0 fs/f2fs/super.c:4572 deactivate_locked_super+0xb0/0x100 fs/super.c:335 deactivate_super+0xa5/0xd0 fs/super.c:366 cleanup_mnt+0x45f/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x147/0x1b0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xfd/0x110 kernel/entry/common.c:175 exit_to_user_mode_prepare kernel/entry/common.c:207 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x79/0xc0 kernel/entry/common.c:300 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fb409e9e537 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 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:00007ffd0661dac8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fb409e9e537 RDX: 00007ffd0661db9c RSI: 000000000000000a RDI: 00007ffd0661db90 RBP: 00007ffd0661db90 R08: 00000000ffffffff R09: 00007ffd0661d960 R10: 0000555556e46793 R11: 0000000000000246 R12: 00007fb409ef7b24 R13: 00007ffd0661ec50 R14: 0000555556e466f0 R15: 00007ffd0661ec90 Modules linked in: CR2: 0000000000000024 ---[ end trace d75392babdac70c3 ]--- RIP: 0010:atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:112 [inline] RIP: 0010:__refcount_add include/linux/refcount.h:193 [inline] RIP: 0010:__refcount_inc include/linux/refcount.h:250 [inline] RIP: 0010:refcount_inc include/linux/refcount.h:267 [inline] RIP: 0010:get_task_struct include/linux/sched/task.h:105 [inline] RIP: 0010:kthread_stop+0x3b/0x3c0 kernel/kthread.c:644 Code: bd 00 00 00 00 00 fc ff df e8 11 9e 26 00 0f 1f 44 00 00 4d 8d 74 24 28 4c 89 f7 be 04 00 00 00 e8 4a 72 69 00 bb 01 00 00 00 41 0f c1 5c 24 28 31 ff 89 de e8 55 a2 26 00 85 db 0f 84 33 01 RSP: 0018:ffffc90005157c58 EFLAGS: 00010246 RAX: ffff88810cd1a700 RBX: 0000000000000001 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000292 RDI: 0000000000000001 RBP: ffffc90005157c80 R08: ffffffff81434253 R09: fffffbfff0e502f9 R10: fffffbfff0e502f9 R11: 1ffffffff0e502f8 R12: fffffffffffffffc R13: dffffc0000000000 R14: 0000000000000024 R15: dffffc0000000000 FS: 0000555556e45400(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000024 CR3: 00000001612d3000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: bd 00 00 00 00 mov $0x0,%ebp 5: 00 fc add %bh,%ah 7: ff (bad) 8: df e8 fucomip %st(0),%st a: 11 9e 26 00 0f 1f adc %ebx,0x1f0f0026(%rsi) 10: 44 00 00 add %r8b,(%rax) 13: 4d 8d 74 24 28 lea 0x28(%r12),%r14 18: 4c 89 f7 mov %r14,%rdi 1b: be 04 00 00 00 mov $0x4,%esi 20: e8 4a 72 69 00 callq 0x69726f 25: bb 01 00 00 00 mov $0x1,%ebx * 2a: f0 41 0f c1 5c 24 28 lock xadd %ebx,0x28(%r12) <-- trapping instruction 31: 31 ff xor %edi,%edi 33: 89 de mov %ebx,%esi 35: e8 55 a2 26 00 callq 0x26a28f 3a: 85 db test %ebx,%ebx 3c: 0f .byte 0xf 3d: 84 33 test %dh,(%rbx) 3f: 01 .byte 0x1