syzbot
KASAN: null-ptr-deref Write in gs_close
Status:
premoderation: reported on 2026/07/30 11:00
Reported-by: syzbot+8e9b97b5dfc0b8d4ee93@syzkaller.appspotmail.com
First crash: 8d06h, last: 8d06h
Sample crash report:
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
BUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1300 [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:187 [inline]
BUG: KASAN: null-ptr-deref in __raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline]
BUG: KASAN: null-ptr-deref in _raw_spin_lock_irq+0x86/0x120 kernel/locking/spinlock.c:170
Write of size 4 at addr 00000000000001b0 by task syz.4.697/1849
CPU: 1 UID: 0 PID: 1849 Comm: syz.4.697 Not tainted syzkaller #0 0b31bef96cff8e44f9e14c4f768eb06c85e3b290
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
__dump_stack+0x21/0x30 lib/dump_stack.c:94
dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
print_report+0x3d/0x70 mm/kasan/report.c:484
kasan_report+0x162/0x1a0 mm/kasan/report.c:594
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x25a/0x2b0 mm/kasan/generic.c:189
__kasan_check_write+0x18/0x20 mm/kasan/shadow.c:37
instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1300 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:111 [inline]
do_raw_spin_lock include/linux/spinlock.h:187 [inline]
__raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline]
_raw_spin_lock_irq+0x86/0x120 kernel/locking/spinlock.c:170
spin_lock_irq include/linux/spinlock.h:376 [inline]
gs_close+0xb1/0x9c0 drivers/usb/gadget/function/u_serial.c:686
tty_release+0x32f/0x11e0 drivers/tty/tty_io.c:1754
tty_open+0x687/0x10b0 drivers/tty/tty_io.c:2155
chrdev_open+0x4eb/0x610 fs/char_dev.c:414
do_dentry_open+0x97c/0x1510 fs/open.c:960
vfs_open+0x86/0x240 fs/open.c:1092
do_open fs/namei.c:3782 [inline]
path_openat+0x2c49/0x35a0 fs/namei.c:3941
do_filp_open+0x1f2/0x440 fs/namei.c:3968
do_sys_openat2+0x134/0x1d0 fs/open.c:1440
do_sys_open fs/open.c:1455 [inline]
__do_sys_openat fs/open.c:1471 [inline]
__se_sys_openat fs/open.c:1466 [inline]
__x64_sys_openat+0x13a/0x170 fs/open.c:1466
x64_sys_call+0xe69/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:258
do_syscall_x64 arch/x86/entry/common.c:47 [inline]
do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7fa7da59df99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa7db3f8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fa7da825fa0 RCX: 00007fa7da59df99
RDX: 0000000000000002 RSI: 0000200000000800 RDI: ffffffffffffff9c
RBP: 00007fa7da634ec4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa7da826038 R14: 00007fa7da825fa0 R15: 00007ffcd56320d8
</TASK>
==================================================================
BUG: kernel NULL pointer dereference, address: 00000000000001b0
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 8000000119022067 P4D 8000000119022067 PUD 0
Oops: Oops: 0002 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 1849 Comm: syz.4.697 Tainted: G B syzkaller #0 0b31bef96cff8e44f9e14c4f768eb06c85e3b290
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:arch_atomic_try_cmpxchg arch/x86/include/asm/atomic.h:107 [inline]
RIP: 0010:raw_atomic_try_cmpxchg_acquire include/linux/atomic/atomic-arch-fallback.h:2170 [inline]
RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1302 [inline]
RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:111 [inline]
RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:187 [inline]
RIP: 0010:__raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline]
RIP: 0010:_raw_spin_lock_irq+0x9c/0x120 kernel/locking/spinlock.c:170
Code: 04 04 c7 44 24 20 00 00 00 00 be 04 00 00 00 e8 8a 69 3a fc 4c 89 f7 be 04 00 00 00 e8 7d 69 3a fc 8b 44 24 20 b9 01 00 00 00 <f0> 0f b1 0b 75 38 43 c6 44 3c 04 f8 48 c7 04 24 0e 36 e0 45 4b c7
RSP: 0018:ffffc90006f9f400 EFLAGS: 00010097
RAX: 0000000000000000 RBX: 00000000000001b0 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90006f9f420
RBP: ffffc90006f9f490 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000df3e84 R12: 1ffff92000df3e80
R13: dffffc0000000000 R14: ffffc90006f9f420 R15: dffffc0000000000
FS: 00007fa7db3f86c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000001b0 CR3: 0000000135718000 CR4: 00000000003526b0
Call Trace:
<TASK>
spin_lock_irq include/linux/spinlock.h:376 [inline]
gs_close+0xb1/0x9c0 drivers/usb/gadget/function/u_serial.c:686
tty_release+0x32f/0x11e0 drivers/tty/tty_io.c:1754
tty_open+0x687/0x10b0 drivers/tty/tty_io.c:2155
chrdev_open+0x4eb/0x610 fs/char_dev.c:414
do_dentry_open+0x97c/0x1510 fs/open.c:960
vfs_open+0x86/0x240 fs/open.c:1092
do_open fs/namei.c:3782 [inline]
path_openat+0x2c49/0x35a0 fs/namei.c:3941
do_filp_open+0x1f2/0x440 fs/namei.c:3968
do_sys_openat2+0x134/0x1d0 fs/open.c:1440
do_sys_open fs/open.c:1455 [inline]
__do_sys_openat fs/open.c:1471 [inline]
__se_sys_openat fs/open.c:1466 [inline]
__x64_sys_openat+0x13a/0x170 fs/open.c:1466
x64_sys_call+0xe69/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:258
do_syscall_x64 arch/x86/entry/common.c:47 [inline]
do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7fa7da59df99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa7db3f8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fa7da825fa0 RCX: 00007fa7da59df99
RDX: 0000000000000002 RSI: 0000200000000800 RDI: ffffffffffffff9c
RBP: 00007fa7da634ec4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa7da826038 R14: 00007fa7da825fa0 R15: 00007ffcd56320d8
</TASK>
Modules linked in:
CR2: 00000000000001b0
---[ end trace 0000000000000000 ]---
RIP: 0010:arch_atomic_try_cmpxchg arch/x86/include/asm/atomic.h:107 [inline]
RIP: 0010:raw_atomic_try_cmpxchg_acquire include/linux/atomic/atomic-arch-fallback.h:2170 [inline]
RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1302 [inline]
RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:111 [inline]
RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:187 [inline]
RIP: 0010:__raw_spin_lock_irq include/linux/spinlock_api_smp.h:120 [inline]
RIP: 0010:_raw_spin_lock_irq+0x9c/0x120 kernel/locking/spinlock.c:170
Code: 04 04 c7 44 24 20 00 00 00 00 be 04 00 00 00 e8 8a 69 3a fc 4c 89 f7 be 04 00 00 00 e8 7d 69 3a fc 8b 44 24 20 b9 01 00 00 00 <f0> 0f b1 0b 75 38 43 c6 44 3c 04 f8 48 c7 04 24 0e 36 e0 45 4b c7
RSP: 0018:ffffc90006f9f400 EFLAGS: 00010097
RAX: 0000000000000000 RBX: 00000000000001b0 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90006f9f420
RBP: ffffc90006f9f490 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000df3e84 R12: 1ffff92000df3e80
R13: dffffc0000000000 R14: ffffc90006f9f420 R15: dffffc0000000000
FS: 00007fa7db3f86c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000001b0 CR3: 0000000135718000 CR4: 00000000003526b0
----------------
Code disassembly (best guess):
0: 04 04 add $0x4,%al
2: c7 44 24 20 00 00 00 movl $0x0,0x20(%rsp)
9: 00
a: be 04 00 00 00 mov $0x4,%esi
f: e8 8a 69 3a fc call 0xfc3a699e
14: 4c 89 f7 mov %r14,%rdi
17: be 04 00 00 00 mov $0x4,%esi
1c: e8 7d 69 3a fc call 0xfc3a699e
21: 8b 44 24 20 mov 0x20(%rsp),%eax
25: b9 01 00 00 00 mov $0x1,%ecx
* 2a: f0 0f b1 0b lock cmpxchg %ecx,(%rbx) <-- trapping instruction
2e: 75 38 jne 0x68
30: 43 c6 44 3c 04 f8 movb $0xf8,0x4(%r12,%r15,1)
36: 48 c7 04 24 0e 36 e0 movq $0x45e0360e,(%rsp)
3d: 45
3e: 4b rex.WXB
3f: c7 .byte 0xc7
* Struck through repros no longer work on HEAD.