Hello,
syzbot found the following issue on:
HEAD commit: 094fc3778d6b Merge 9d091e874b66 ("cpufreq: schedutil: Simp..
git tree: android13-5.10-lts
console output:
https://syzkaller.appspot.com/x/log.txt?x=10f8894c580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b0867136c1e117ab
dashboard link:
https://syzkaller.appspot.com/bug?extid=29fcdc1e1210dbbec4f5
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=13aaa178580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=15447c3f980000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/e4ed50b42b79/disk-094fc377.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/89a1f19d8fd6/vmlinux-094fc377.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/1ce7f082940d/bzImage-094fc377.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/8eb9d4139da1/mount_0.gz
fsck result: failed (log:
https://syzkaller.appspot.com/x/fsck.log?x=1080694c580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+29fcdc...@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/asm-generic/atomic-instrumented.h:142 [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:108 [inline]
BUG: KASAN: null-ptr-deref in kthread_stop+0x3b/0x410 kernel/kthread.c:640
Write of size 4 at addr 0000000000000020 by task syz-executor691/325
CPU: 1 PID: 325 Comm: syz-executor691 Not tainted 5.10.234-syzkaller-00033-g094fc3778d6b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
__kasan_report mm/kasan/report.c:439 [inline]
kasan_report+0x167/0x1c0 mm/kasan/report.c:452
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x293/0x2a0 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/asm-generic/atomic-instrumented.h:142 [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:108 [inline]
kthread_stop+0x3b/0x410 kernel/kthread.c:640
f2fs_stop_gc_thread+0x65/0xb0 fs/f2fs/gc.c:199
f2fs_ioc_shutdown fs/f2fs/file.c:2361 [inline]
__f2fs_ioctl+0x7830/0xda80 fs/f2fs/file.c:4330
f2fs_ioctl+0x170/0x550 fs/f2fs/file.c:4415
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x114/0x190 fs/ioctl.c:739
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
do_syscall_64+0x34/0x70 arch/x86/entry/common.c:-1
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f819769c089
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:00007f8197637168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f81977296d8 RCX: 00007f819769c089
RDX: 0000200000000140 RSI: 000000008004587d RDI: 0000000000000005
RBP: 00007f81977296d0 R08: 00007f81976376c0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f81977296dc
R13: 000000000000006e R14: 00007ffc0fbdff00 R15: 00007ffc0fbdffe8
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000020
#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: 325 Comm: syz-executor691 Tainted: G B 5.10.234-syzkaller-00033-g094fc3778d6b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:arch_atomic_fetch_add include/linux/instrumented.h:-1 [inline]
RIP: 0010:atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:143 [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:108 [inline]
RIP: 0010:kthread_stop+0x40/0x410 kernel/kthread.c:640
Code: 00 fc ff df e8 31 26 24 00 0f 1f 44 00 00 e8 27 26 24 00 4d 8d 74 24 20 4c 89 f7 be 04 00 00 00 e8 55 c7 61 00 bb 01 00 00 00 <f0> 41 0f c1 5c 24 20 31 ff 89 de e8 b0 29 24 00 85 db 0f 84 2f 01
RSP: 0018:ffffc90000de7838 EFLAGS: 00010246
RAX: ffff88810c911300 RBX: 0000000000000001 RCX: ffff88810c9113c0
RDX: 0000000000000000 RSI: 0000000000000282 RDI: 00000000ffffffff
RBP: ffffc90000de7860 R08: ffffffff813e2b8b R09: 0000000000000003
R10: fffffbfff0e11248 R11: dffffc0000000001 R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000020 R15: dffffc0000000000
FS: 00007f81976376c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000020 CR3: 000000011d703000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
f2fs_stop_gc_thread+0x65/0xb0 fs/f2fs/gc.c:199
f2fs_ioc_shutdown fs/f2fs/file.c:2361 [inline]
__f2fs_ioctl+0x7830/0xda80 fs/f2fs/file.c:4330
f2fs_ioctl+0x170/0x550 fs/f2fs/file.c:4415
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x114/0x190 fs/ioctl.c:739
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
do_syscall_64+0x34/0x70 arch/x86/entry/common.c:-1
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f819769c089
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:00007f8197637168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f81977296d8 RCX: 00007f819769c089
RDX: 0000200000000140 RSI: 000000008004587d RDI: 0000000000000005
RBP: 00007f81977296d0 R08: 00007f81976376c0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f81977296dc
R13: 000000000000006e R14: 00007ffc0fbdff00 R15: 00007ffc0fbdffe8
Modules linked in:
CR2: 0000000000000020
---[ end trace 4ec8bd11c35cfc07 ]---
RIP: 0010:arch_atomic_fetch_add include/linux/instrumented.h:-1 [inline]
RIP: 0010:atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:143 [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:108 [inline]
RIP: 0010:kthread_stop+0x40/0x410 kernel/kthread.c:640
Code: 00 fc ff df e8 31 26 24 00 0f 1f 44 00 00 e8 27 26 24 00 4d 8d 74 24 20 4c 89 f7 be 04 00 00 00 e8 55 c7 61 00 bb 01 00 00 00 <f0> 41 0f c1 5c 24 20 31 ff 89 de e8 b0 29 24 00 85 db 0f 84 2f 01
RSP: 0018:ffffc90000de7838 EFLAGS: 00010246
RAX: ffff88810c911300 RBX: 0000000000000001 RCX: ffff88810c9113c0
RDX: 0000000000000000 RSI: 0000000000000282 RDI: 00000000ffffffff
RBP: ffffc90000de7860 R08: ffffffff813e2b8b R09: 0000000000000003
R10: fffffbfff0e11248 R11: dffffc0000000001 R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000020 R15: dffffc0000000000
FS: 00007f81976376c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000020 CR3: 000000011d703000 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: 31 26 xor %esp,(%rsi)
4: 24 00 and $0x0,%al
6: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
b: e8 27 26 24 00 call 0x242637
10: 4d 8d 74 24 20 lea 0x20(%r12),%r14
15: 4c 89 f7 mov %r14,%rdi
18: be 04 00 00 00 mov $0x4,%esi
1d: e8 55 c7 61 00 call 0x61c777
22: bb 01 00 00 00 mov $0x1,%ebx
* 27: f0 41 0f c1 5c 24 20 lock xadd %ebx,0x20(%r12) <-- trapping instruction
2e: 31 ff xor %edi,%edi
30: 89 de mov %ebx,%esi
32: e8 b0 29 24 00 call 0x2429e7
37: 85 db test %ebx,%ebx
39: 0f .byte 0xf
3a: 84 2f test %ch,(%rdi)
3c: 01 .byte 0x1
---
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