KASAN: use-after-free Read in usbhid_power

Status: upstream: reported C repro on 2026/10/05 17:04
Reported-by: syzbot+3662c8a363ba96f802a7@syzkaller.appspotmail.com
First crash: 4d18h, last: 4d17h
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in usbhid_power usb input 19 syz, C 590 2571d 2635d 0/29 closed as dup on 2019/08/12 14:29
android-6-12 KASAN: slab-use-after-free Read in usbhid_power 19 syz 31 32d 46d 0/1 premoderation: reported syz repro on 2026/08/24 13:34

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in usbhid_power+0x78/0xc0 drivers/hid/usbhid/hid-core.c:1281
Read of size 8 at addr ffff88812f2c0008 by task syz.5.20/410

CPU: 0 PID: 410 Comm: syz.5.20 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
 usbhid_power+0x78/0xc0 drivers/hid/usbhid/hid-core.c:1281
 hid_hw_power include/linux/hid.h:1139 [inline]
 hidraw_open+0x272/0x920 drivers/hid/hidraw.c:288
 chrdev_open+0x593/0x600 fs/char_dev.c:414
 do_dentry_open+0x885/0x11f0 fs/open.c:884
 vfs_open+0x73/0x80 fs/open.c:1017
 do_open fs/namei.c:3633 [inline]
 path_openat+0x2699/0x2f30 fs/namei.c:3790
 do_filp_open+0x1ee/0x420 fs/namei.c:3817
 do_sys_openat2+0x15e/0x820 fs/open.c:1343
 do_sys_open fs/open.c:1359 [inline]
 __do_sys_openat fs/open.c:1375 [inline]
 __se_sys_openat fs/open.c:1370 [inline]
 __x64_sys_openat+0x136/0x160 fs/open.c:1370
 x64_sys_call+0x783/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f26d8d5e9ce
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f26d9c48b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f26d9c496c0 RCX: 00007f26d8d5e9ce
RDX: 0000000000008a00 RSI: 00007f26d9c48c00 RDI: ffffffffffffff9c
RBP: 00007f26d9c48c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f26d9026038 R14: 00007f26d9025fa0 R15: 00007fff0c9fb328
 </TASK>

The buggy address belongs to the object at ffff88812f2c0000
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 8 bytes inside of
 512-byte region [ffff88812f2c0000, ffff88812f2c0200)

The buggy address belongs to the physical page:
page:ffffea0004bcb000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12f2c0
head:ffffea0004bcb000 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000122 ffff888100042f00
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 352, tgid 352 (kworker/1:2), ts 31437243319, free_ts 31400356344
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1967 [inline]
 new_slab+0x98/0x3e0 mm/slub.c:2020
 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
 __do_kmalloc_node mm/slab_common.c:937 [inline]
 __kmalloc_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958
 kmalloc_reserve net/core/skbuff.c:449 [inline]
 __alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
 alloc_skb include/linux/skbuff.h:1322 [inline]
 nlmsg_new include/net/netlink.h:987 [inline]
 inet6_ifa_notify net/ipv6/addrconf.c:5569 [inline]
 __ipv6_ifa_notify+0x200/0xe80 net/ipv6/addrconf.c:6227
 ipv6_ifa_notify net/ipv6/addrconf.c:6279 [inline]
 addrconf_dad_completed+0x192/0xe80 net/ipv6/addrconf.c:4283
 addrconf_dad_work+0xc1b/0x14a0 net/ipv6/addrconf.c:-1
 process_one_work+0x717/0xc30 kernel/workqueue.c:2302
 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1581 [inline]
 free_pcp_prepare mm/page_alloc.c:1655 [inline]
 free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622
 free_unref_page+0x93/0x530 mm/page_alloc.c:3720
 free_the_page mm/page_alloc.c:863 [inline]
 __free_pages+0x67/0x100 mm/page_alloc.c:6021
 free_large_kmalloc+0xae/0xf0 mm/slab_common.c:915
 kfree+0x8b/0xf0 mm/slab_common.c:984
 usbhid_disconnect+0xa7/0xc0 drivers/hid/usbhid/hid-core.c:1470
 usb_unbind_interface+0x223/0x8b0 drivers/usb/core/driver.c:459
 device_remove drivers/base/dd.c:550 [inline]
 __device_release_driver drivers/base/dd.c:1283 [inline]
 device_release_driver_internal+0x4e4/0x7e0 drivers/base/dd.c:1309
 device_release_driver+0x19/0x20 drivers/base/dd.c:1332
 bus_remove_device+0x2f0/0x350 drivers/base/bus.c:531
 device_del+0x63c/0xe50 drivers/base/core.c:3886
 usb_disable_device+0x3a8/0x750 drivers/usb/core/message.c:1472
 usb_disconnect+0x32d/0x880 drivers/usb/core/hub.c:2339
 hub_port_connect drivers/usb/core/hub.c:5433 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5734 [inline]
 port_event drivers/usb/core/hub.c:5898 [inline]
 hub_event+0x1a66/0x4310 drivers/usb/core/hub.c:5980
 process_one_work+0x717/0xc30 kernel/workqueue.c:2302
 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449

Memory state around the buggy address:
 ffff88812f2bff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88812f2bff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88812f2c0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                      ^
 ffff88812f2c0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88812f2c0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:131:9
index 16382 is out of range for type 'unsigned long[8]'
CPU: 1 PID: 410 Comm: syz.5.20 Tainted: G    B              syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 dump_stack+0x15/0x24 lib/dump_stack.c:113
 ubsan_epilogue+0xe/0x40 lib/ubsan.c:151
 __ubsan_handle_out_of_bounds+0xdf/0xf0 lib/ubsan.c:282
 decode_tail kernel/locking/qspinlock.c:131 [inline]
 __pv_queued_spin_lock_slowpath+0x9ea/0xc40 kernel/locking/qspinlock.c:471
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
 queued_spin_lock_slowpath+0x47/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
 do_raw_spin_lock include/linux/spinlock.h:187 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0x120/0x130 kernel/locking/spinlock.c:162
 __pm_runtime_resume+0x5c/0x90 drivers/base/power/runtime.c:1170
 pm_runtime_get_sync include/linux/pm_runtime.h:435 [inline]
 usb_autopm_get_interface+0x20/0x60 drivers/usb/core/driver.c:1827
 usbhid_power+0x80/0xc0 drivers/hid/usbhid/hid-core.c:1281
 hid_hw_power include/linux/hid.h:1139 [inline]
 hidraw_open+0x272/0x920 drivers/hid/hidraw.c:288
 chrdev_open+0x593/0x600 fs/char_dev.c:414
 do_dentry_open+0x885/0x11f0 fs/open.c:884
 vfs_open+0x73/0x80 fs/open.c:1017
 do_open fs/namei.c:3633 [inline]
 path_openat+0x2699/0x2f30 fs/namei.c:3790
 do_filp_open+0x1ee/0x420 fs/namei.c:3817
 do_sys_openat2+0x15e/0x820 fs/open.c:1343
 do_sys_open fs/open.c:1359 [inline]
 __do_sys_openat fs/open.c:1375 [inline]
 __se_sys_openat fs/open.c:1370 [inline]
 __x64_sys_openat+0x136/0x160 fs/open.c:1370
 x64_sys_call+0x783/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f26d8d5e9ce
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f26d9c48b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f26d9c496c0 RCX: 00007f26d8d5e9ce
RDX: 0000000000008a00 RSI: 00007f26d9c48c00 RDI: ffffffffffffff9c
RBP: 00007f26d9c48c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f26d9026038 R14: 00007f26d9025fa0 R15: 00007fff0c9fb328
 </TASK>
================================================================================
general protection fault, probably for non-canonical address 0xe0130a8f9f54405e: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0x0098747cfaa202f0-0x0098747cfaa202f7]
CPU: 1 PID: 410 Comm: syz.5.20 Tainted: G    B              syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:__pv_queued_spin_lock_slowpath+0x2c8/0xc40 kernel/locking/qspinlock.c:474
Code: 86 4c 89 f8 48 c1 e8 03 80 3c 10 00 74 12 4c 89 ff e8 1c 59 b5 fc 48 ba 00 00 00 00 00 fc ff df 4d 03 2f 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 4d 89 ef 4c 8b 6c 24 30 74 12 4c 89 ff e8 e2 59 b5 fc
RSP: 0018:ffffc90004057540 EFLAGS: 00010003
RAX: 00130e8f9f54405e RBX: ffffffff87803a04 RCX: ffff888118c86540
RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 00000000ffffffff
RBP: ffffc90004057630 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0f6ec4c R12: 1ffff1103ede71c9
R13: 0098747cfaa202f6 R14: 1ffffffff0f00740 R15: ffffffff866f6990
FS:  00007f26d9c496c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4019deb880 CR3: 0000000131e70000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
 queued_spin_lock_slowpath+0x47/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
 do_raw_spin_lock include/linux/spinlock.h:187 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0x120/0x130 kernel/locking/spinlock.c:162
 __pm_runtime_resume+0x5c/0x90 drivers/base/power/runtime.c:1170
 pm_runtime_get_sync include/linux/pm_runtime.h:435 [inline]
 usb_autopm_get_interface+0x20/0x60 drivers/usb/core/driver.c:1827
 usbhid_power+0x80/0xc0 drivers/hid/usbhid/hid-core.c:1281
 hid_hw_power include/linux/hid.h:1139 [inline]
 hidraw_open+0x272/0x920 drivers/hid/hidraw.c:288
 chrdev_open+0x593/0x600 fs/char_dev.c:414
 do_dentry_open+0x885/0x11f0 fs/open.c:884
 vfs_open+0x73/0x80 fs/open.c:1017
 do_open fs/namei.c:3633 [inline]
 path_openat+0x2699/0x2f30 fs/namei.c:3790
 do_filp_open+0x1ee/0x420 fs/namei.c:3817
 do_sys_openat2+0x15e/0x820 fs/open.c:1343
 do_sys_open fs/open.c:1359 [inline]
 __do_sys_openat fs/open.c:1375 [inline]
 __se_sys_openat fs/open.c:1370 [inline]
 __x64_sys_openat+0x136/0x160 fs/open.c:1370
 x64_sys_call+0x783/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f26d8d5e9ce
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f26d9c48b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f26d9c496c0 RCX: 00007f26d8d5e9ce
RDX: 0000000000008a00 RSI: 00007f26d9c48c00 RDI: ffffffffffffff9c
RBP: 00007f26d9c48c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f26d9026038 R14: 00007f26d9025fa0 R15: 00007fff0c9fb328
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__pv_queued_spin_lock_slowpath+0x2c8/0xc40 kernel/locking/qspinlock.c:474
Code: 86 4c 89 f8 48 c1 e8 03 80 3c 10 00 74 12 4c 89 ff e8 1c 59 b5 fc 48 ba 00 00 00 00 00 fc ff df 4d 03 2f 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 4d 89 ef 4c 8b 6c 24 30 74 12 4c 89 ff e8 e2 59 b5 fc
RSP: 0018:ffffc90004057540 EFLAGS: 00010003
RAX: 00130e8f9f54405e RBX: ffffffff87803a04 RCX: ffff888118c86540
RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 00000000ffffffff
RBP: ffffc90004057630 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0f6ec4c R12: 1ffff1103ede71c9
R13: 0098747cfaa202f6 R14: 1ffffffff0f00740 R15: ffffffff866f6990
FS:  00007f26d9c496c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4019deb880 CR3: 0000000131e70000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	86 4c 89 f8          	xchg   %cl,-0x8(%rcx,%rcx,4)
   4:	48 c1 e8 03          	shr    $0x3,%rax
   8:	80 3c 10 00          	cmpb   $0x0,(%rax,%rdx,1)
   c:	74 12                	je     0x20
   e:	4c 89 ff             	mov    %r15,%rdi
  11:	e8 1c 59 b5 fc       	call   0xfcb55932
  16:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  1d:	fc ff df
  20:	4d 03 2f             	add    (%r15),%r13
  23:	4c 89 e8             	mov    %r13,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 10 00          	cmpb   $0x0,(%rax,%rdx,1) <-- trapping instruction
  2e:	4d 89 ef             	mov    %r13,%r15
  31:	4c 8b 6c 24 30       	mov    0x30(%rsp),%r13
  36:	74 12                	je     0x4a
  38:	4c 89 ff             	mov    %r15,%rdi
  3b:	e8 e2 59 b5 fc       	call   0xfcb55a22

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/05 17:02 android14-6.1 6612ef9d0b09 af63e995 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in usbhid_power
2026/10/05 16:29 android14-6.1 6612ef9d0b09 af63e995 .config strace log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in usbhid_power
* Struck through repros no longer work on HEAD.