==================================================================
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/26679
CPU: 1 PID: 26679 Comm: syz-executor.2 Not tainted 6.1.25-syzkaller-00268-gae6e8fb652a7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/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
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x8b/0xa0 kernel/entry/common.c:171
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:0x7fb364c3e01b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffd3f74fff0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fb364c3e01b
RDX: 0000000000000000 RSI: 00007fb364000368 RDI: 0000000000000004
RBP: 00007fb364dad980 R08: 0000000000000000 R09: 00000000c9187459
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000001fca3b
R13: 00007ffd3f7500f0 R14: 00007ffd3f750110 R15: 0000000000000032
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000038
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 11f5bb067 P4D 11f5bb067 PUD 116edb067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 26679 Comm: syz-executor.2 Tainted: G B 6.1.25-syzkaller-00268-gae6e8fb652a7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/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 84 c0 ae fc 4c 89 e7 be 04 00 00 00 e8 77 c0 ae 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:ffffc90009877be0 EFLAGS: 00010097
RAX: 0000000000000000 RBX: 1ffff9200130ef84 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90009877c20
RBP: ffffc90009877cb8 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffffc90009877c20
R13: 0000000000000038 R14: 1ffff9200130ef80 R15: dffffc0000000000
FS: 0000555557212400(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000038 CR3: 0000000110f09000 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
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x8b/0xa0 kernel/entry/common.c:171
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:0x7fb364c3e01b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffd3f74fff0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fb364c3e01b
RDX: 0000000000000000 RSI: 00007fb364000368 RDI: 0000000000000004
RBP: 00007fb364dad980 R08: 0000000000000000 R09: 00000000c9187459
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000001fca3b
R13: 00007ffd3f7500f0 R14: 00007ffd3f750110 R15: 0000000000000032
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 84 c0 ae fc 4c 89 e7 be 04 00 00 00 e8 77 c0 ae 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:ffffc90009877be0 EFLAGS: 00010097
RAX: 0000000000000000 RBX: 1ffff9200130ef84 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90009877c20
RBP: ffffc90009877cb8 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffffc90009877c20
R13: 0000000000000038 R14: 1ffff9200130ef80 R15: dffffc0000000000
FS: 0000555557212400(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000038 CR3: 0000000110f09000 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 84 c0 ae fc callq 0xfcaec08b
7: 4c 89 e7 mov %r12,%rdi
a: be 04 00 00 00 mov $0x4,%esi
f: e8 77 c0 ae fc callq 0xfcaec08b
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