Hello,
syzbot found the following issue on:
HEAD commit: eabc268e4fb2 Merge 5.15.187 into android13-5.15-lts
git tree: android13-5.15-lts
console+strace:
https://syzkaller.appspot.com/x/log.txt?x=16d48382580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=a33ec5882e2a7926
dashboard link:
https://syzkaller.appspot.com/bug?extid=5e72f23344f724a24cab
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=1385f0f0580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=1682d18c580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/02a5b21726f1/disk-eabc268e.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/5120bbf135fb/vmlinux-eabc268e.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/fb75ad5bdd45/bzImage-eabc268e.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/fd13cf0e0fd2/mount_0.gz
fsck result: failed (log:
https://syzkaller.appspot.com/x/fsck.log?x=1585f0f0580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+5e72f2...@syzkaller.appspotmail.com
==================================================================
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:106 [inline]
BUG: KASAN: null-ptr-deref in kthread_stop+0x3a/0x3e0 kernel/kthread.c:675
Write of size 4 at addr 0000000000000028 by task syz-executor225/306
CPU: 0 PID: 306 Comm: syz-executor225 Not tainted 5.15.187-syzkaller-00603-geabc268e4fb2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
<TASK>
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
__kasan_report mm/kasan/report.c:431 [inline]
kasan_report+0xe7/0x140 mm/kasan/report.c:444
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x280/0x290 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:106 [inline]
kthread_stop+0x3a/0x3e0 kernel/kthread.c:675
f2fs_stop_gc_thread+0x65/0xb0 fs/f2fs/gc.c:198
f2fs_ioc_shutdown fs/f2fs/file.c:2273 [inline]
__f2fs_ioctl+0x5c36/0xb150 fs/f2fs/file.c:4192
f2fs_ioctl+0x149/0x240 fs/f2fs/file.c:4273
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860
x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fe4d2b22909
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4d2adf218 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe4d2bae6c8 RCX: 00007fe4d2b22909
RDX: 0000200000000140 RSI: 000000008004587d RDI: 0000000000000005
RBP: 00007fe4d2bae6c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe4d2b7b8fc
R13: 3505e258dcaaa166 R14: 0000200000000000 R15: b635773f06ebbeee
</TASK>
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000028
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 0 P4D 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 306 Comm: syz-executor225 Tainted: G B 5.15.187-syzkaller-00603-geabc268e4fb2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:arch_atomic_fetch_add arch/x86/include/asm/atomic.h:184 [inline]
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:106 [inline]
RIP: 0010:kthread_stop+0x40/0x3e0 kernel/kthread.c:675
Code: 00 fc ff df e8 e1 c4 23 00 0f 1f 44 00 00 e8 d7 c4 23 00 4c 8d 73 28 4c 89 f7 be 04 00 00 00 e8 d6 3d 62 00 41 bf 01 00 00 00 <f0> 44 0f c1 7b 28 31 ff 44 89 fe e8 60 c8 23 00 45 85 ff 0f 84 32
RSP: 0018:ffffc90000b47918 EFLAGS: 00010246
RAX: ffff88811e4d1300 RBX: 0000000000000000 RCX: ffff88811e4d13c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000b47940 R08: 0000000000000004 R09: 0000000000000003
R10: fffffbfff0e17c4c R11: 1ffffffff0e17c4c R12: 1ffff11021509523
R13: dffffc0000000000 R14: 0000000000000028 R15: 0000000000000001
FS: 00007fe4d2adf6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000028 CR3: 0000000122566000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
f2fs_stop_gc_thread+0x65/0xb0 fs/f2fs/gc.c:198
f2fs_ioc_shutdown fs/f2fs/file.c:2273 [inline]
__f2fs_ioctl+0x5c36/0xb150 fs/f2fs/file.c:4192
f2fs_ioctl+0x149/0x240 fs/f2fs/file.c:4273
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860
x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fe4d2b22909
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe4d2adf218 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe4d2bae6c8 RCX: 00007fe4d2b22909
RDX: 0000200000000140 RSI: 000000008004587d RDI: 0000000000000005
RBP: 00007fe4d2bae6c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe4d2b7b8fc
R13: 3505e258dcaaa166 R14: 0000200000000000 R15: b635773f06ebbeee
</TASK>
Modules linked in:
CR2: 0000000000000028
---[ end trace d1803461e1853f5a ]---
RIP: 0010:arch_atomic_fetch_add arch/x86/include/asm/atomic.h:184 [inline]
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:106 [inline]
RIP: 0010:kthread_stop+0x40/0x3e0 kernel/kthread.c:675
Code: 00 fc ff df e8 e1 c4 23 00 0f 1f 44 00 00 e8 d7 c4 23 00 4c 8d 73 28 4c 89 f7 be 04 00 00 00 e8 d6 3d 62 00 41 bf 01 00 00 00 <f0> 44 0f c1 7b 28 31 ff 44 89 fe e8 60 c8 23 00 45 85 ff 0f 84 32
RSP: 0018:ffffc90000b47918 EFLAGS: 00010246
RAX: ffff88811e4d1300 RBX: 0000000000000000 RCX: ffff88811e4d13c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff
RBP: ffffc90000b47940 R08: 0000000000000004 R09: 0000000000000003
R10: fffffbfff0e17c4c R11: 1ffffffff0e17c4c R12: 1ffff11021509523
R13: dffffc0000000000 R14: 0000000000000028 R15: 0000000000000001
FS: 00007fe4d2adf6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000028 CR3: 0000000122566000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 3 bytes skipped:
0: df e8 fucomip %st(0),%st
2: e1 c4 loope 0xffffffc8
4: 23 00 and (%rax),%eax
6: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
b: e8 d7 c4 23 00 call 0x23c4e7
10: 4c 8d 73 28 lea 0x28(%rbx),%r14
14: 4c 89 f7 mov %r14,%rdi
17: be 04 00 00 00 mov $0x4,%esi
1c: e8 d6 3d 62 00 call 0x623df7
21: 41 bf 01 00 00 00 mov $0x1,%r15d
* 27: f0 44 0f c1 7b 28 lock xadd %r15d,0x28(%rbx) <-- trapping instruction
2d: 31 ff xor %edi,%edi
2f: 44 89 fe mov %r15d,%esi
32: e8 60 c8 23 00 call 0x23c897
37: 45 85 ff test %r15d,%r15d
3a: 0f .byte 0xf
3b: 84 32 test %dh,(%rdx)
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup