==================================================================
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/554
CPU: 1 PID: 554 Comm: syz-executor.4 Not tainted 5.15.74-syzkaller-04383-g7f2e600bf63a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
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:1761
kill_f2fs_super+0xe0/0x3c0 fs/f2fs/super.c:4525
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:0x7f85f14e0a17
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:00007ffd92a77798 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f85f14e0a17
RDX: 00007ffd92a7786a RSI: 000000000000000a RDI: 00007ffd92a77860
RBP: 00007ffd92a77860 R08: 00000000ffffffff R09: 00007ffd92a77630
R10: 00005555567ac793 R11: 0000000000000246 R12: 00007f85f15395f6
R13: 00007ffd92a78920 R14: 00005555567ac6f0 R15: 00007ffd92a78960
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000024
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 128afd067 P4D 128afd067 PUD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 554 Comm: syz-executor.4 Tainted: G B 5.15.74-syzkaller-04383-g7f2e600bf63a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
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 61 cc 25 00 0f 1f 44 00 00 4d 8d 74 24 28 4c 89 f7 be 04 00 00 00 e8 0a 1b 68 00 bb 01 00 00 00 41 0f c1 5c 24 28 31 ff 89 de e8 a5 d0 25 00 85 db 0f 84 33 01
RSP: 0018:ffffc9000624fc58 EFLAGS: 00010246
RAX: ffff888107fa4f00 RBX: 0000000000000001 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000292 RDI: 0000000000000001
RBP: ffffc9000624fc80 R08: ffffffff8142fa13 R09: fffffbfff0e4f8f5
R10: fffffbfff0e4f8f5 R11: 1ffffffff0e4f8f4 R12: fffffffffffffffc
R13: dffffc0000000000 R14: 0000000000000024 R15: dffffc0000000000
FS: 00005555567ab400(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000024 CR3: 00000001531aa000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
f2fs_stop_discard_thread+0xa1/0xc0 fs/f2fs/segment.c:1761
kill_f2fs_super+0xe0/0x3c0 fs/f2fs/super.c:4525
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:0x7f85f14e0a17
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:00007ffd92a77798 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f85f14e0a17
RDX: 00007ffd92a7786a RSI: 000000000000000a RDI: 00007ffd92a77860
RBP: 00007ffd92a77860 R08: 00000000ffffffff R09: 00007ffd92a77630
R10: 00005555567ac793 R11: 0000000000000246 R12: 00007f85f15395f6
R13: 00007ffd92a78920 R14: 00005555567ac6f0 R15: 00007ffd92a78960
Modules linked in:
CR2: 0000000000000024
---[ end trace c4e5880126915ecc ]---
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 61 cc 25 00 0f 1f 44 00 00 4d 8d 74 24 28 4c 89 f7 be 04 00 00 00 e8 0a 1b 68 00 bb 01 00 00 00 41 0f c1 5c 24 28 31 ff 89 de e8 a5 d0 25 00 85 db 0f 84 33 01
RSP: 0018:ffffc9000624fc58 EFLAGS: 00010246
RAX: ffff888107fa4f00 RBX: 0000000000000001 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000292 RDI: 0000000000000001
RBP: ffffc9000624fc80 R08: ffffffff8142fa13 R09: fffffbfff0e4f8f5
R10: fffffbfff0e4f8f5 R11: 1ffffffff0e4f8f4 R12: fffffffffffffffc
R13: dffffc0000000000 R14: 0000000000000024 R15: dffffc0000000000
FS: 00005555567ab400(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000024 CR3: 00000001531aa000 CR4: 00000000003526b0
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: 61 (bad)
b: cc int3
c: 25 00 0f 1f 44 and $0x441f0f00,%eax
11: 00 00 add %al,(%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 0a 1b 68 00 callq 0x681b2f
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 a5 d0 25 00 callq 0x25d0df
3a: 85 db test %ebx,%ebx
3c: 0f .byte 0xf
3d: 84 33 test %dh,(%rbx)
3f: 01 .byte 0x1