================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:102 [inline] BUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] BUG: KASAN: null-ptr-deref in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: null-ptr-deref in do_raw_spin_lock include/linux/spinlock.h:186 [inline] BUG: KASAN: null-ptr-deref in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] BUG: KASAN: null-ptr-deref in _raw_spin_lock_irqsave+0xec/0x210 kernel/locking/spinlock.c:162 Write of size 4 at addr 0000000000000038 by task syz-executor.2/1603 CPU: 1 PID: 1603 Comm: syz-executor.2 Not tainted 6.1.25-syzkaller-00009-g08f318933781 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_report+0xe1/0x4e0 mm/kasan/report.c:398 kasan_report+0x13c/0x170 mm/kasan/report.c:495 kasan_check_range+0x294/0x2a0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:102 [inline] atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] do_raw_spin_lock include/linux/spinlock.h:186 [inline] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xec/0x210 kernel/locking/spinlock.c:162 hidraw_release+0xbe/0x600 drivers/hid/hidraw.c:352 __fput+0x3ab/0x870 fs/file_table.c:320 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x24d/0x2e0 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xbc5/0x2a40 kernel/exit.c:872 do_group_exit+0x21a/0x2d0 kernel/exit.c:1022 get_signal+0x169d/0x1820 kernel/signal.c:2861 arch_do_signal_or_restart+0xb0/0x16f0 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x6b/0xa0 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x130 kernel/entry/common.c:297 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff5d6c8c169 Code: Unable to access opcode bytes at 0x7ff5d6c8c13f. RSP: 002b:00007ff5d7a17168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffe0 RBX: 00007ff5d6dabf80 RCX: 00007ff5d6c8c169 RDX: 00000000200000c0 RSI: 00000000c0404807 RDI: 0000000000000004 RBP: 00007ff5d6ce7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd926dda1f R14: 00007ff5d7a17300 R15: 0000000000022000 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000038 #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: 1 PID: 1603 Comm: syz-executor.2 Tainted: G B 6.1.25-syzkaller-00009-g08f318933781 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:543 [inline] RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:186 [inline] RIP: 0010:__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] RIP: 0010:_raw_spin_lock_irqsave+0x10f/0x210 kernel/locking/spinlock.c:162 Code: 00 00 e8 b4 c3 ad fc 4c 89 e7 be 04 00 00 00 e8 a7 c3 ad fc 42 0f b6 04 3b 84 c0 0f 85 be 00 00 00 8b 44 24 40 b9 01 00 00 00 41 0f b1 4d 00 75 45 48 c7 44 24 20 0e 36 e0 45 4b c7 04 37 00 RSP: 0018:ffffc90000a076a0 EFLAGS: 00010097 RAX: 0000000000000000 RBX: 1ffff92000140edc RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90000a076e0 RBP: ffffc90000a07778 R08: dffffc0000000000 R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: ffffc90000a076e0 R13: 0000000000000038 R14: 1ffff92000140ed8 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 000000010f9a1000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hidraw_release+0xbe/0x600 drivers/hid/hidraw.c:352 __fput+0x3ab/0x870 fs/file_table.c:320 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x24d/0x2e0 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xbc5/0x2a40 kernel/exit.c:872 do_group_exit+0x21a/0x2d0 kernel/exit.c:1022 get_signal+0x169d/0x1820 kernel/signal.c:2861 arch_do_signal_or_restart+0xb0/0x16f0 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x6b/0xa0 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x130 kernel/entry/common.c:297 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff5d6c8c169 Code: Unable to access opcode bytes at 0x7ff5d6c8c13f. RSP: 002b:00007ff5d7a17168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffe0 RBX: 00007ff5d6dabf80 RCX: 00007ff5d6c8c169 RDX: 00000000200000c0 RSI: 00000000c0404807 RDI: 0000000000000004 RBP: 00007ff5d6ce7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd926dda1f R14: 00007ff5d7a17300 R15: 0000000000022000 Modules linked in: CR2: 0000000000000038 ---[ end trace 0000000000000000 ]--- RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:543 [inline] RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:186 [inline] RIP: 0010:__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] RIP: 0010:_raw_spin_lock_irqsave+0x10f/0x210 kernel/locking/spinlock.c:162 Code: 00 00 e8 b4 c3 ad fc 4c 89 e7 be 04 00 00 00 e8 a7 c3 ad fc 42 0f b6 04 3b 84 c0 0f 85 be 00 00 00 8b 44 24 40 b9 01 00 00 00 41 0f b1 4d 00 75 45 48 c7 44 24 20 0e 36 e0 45 4b c7 04 37 00 RSP: 0018:ffffc90000a076a0 EFLAGS: 00010097 RAX: 0000000000000000 RBX: 1ffff92000140edc RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90000a076e0 RBP: ffffc90000a07778 R08: dffffc0000000000 R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: ffffc90000a076e0 R13: 0000000000000038 R14: 1ffff92000140ed8 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 000000010f9a1000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: e8 b4 c3 ad fc callq 0xfcadc3bb 7: 4c 89 e7 mov %r12,%rdi a: be 04 00 00 00 mov $0x4,%esi f: e8 a7 c3 ad fc callq 0xfcadc3bb 14: 42 0f b6 04 3b movzbl (%rbx,%r15,1),%eax 19: 84 c0 test %al,%al 1b: 0f 85 be 00 00 00 jne 0xdf 21: 8b 44 24 40 mov 0x40(%rsp),%eax 25: b9 01 00 00 00 mov $0x1,%ecx * 2a: f0 41 0f b1 4d 00 lock cmpxchg %ecx,0x0(%r13) <-- trapping instruction 30: 75 45 jne 0x77 32: 48 c7 44 24 20 0e 36 movq $0x45e0360e,0x20(%rsp) 39: e0 45 3b: 4b rex.WXB 3c: c7 .byte 0xc7 3d: 04 37 add $0x37,%al