==================================================================
BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x243/0x530 drivers/usb/core/hcd.c:774
Write of size 2 at addr ffff88801a4e95f0 by task syz-executor.0/23019
CPU: 0 PID: 23019 Comm: syz-executor.0 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106
print_address_description+0x65/0x380 mm/kasan/report.c:247
__kasan_report mm/kasan/report.c:433 [inline]
kasan_report+0x19a/0x1f0 mm/kasan/report.c:450
kasan_check_range+0x2b5/0x2f0 mm/kasan/generic.c:189
memcpy+0x3c/0x60 mm/kasan/shadow.c:66
usb_hcd_poll_rh_status+0x243/0x530 drivers/usb/core/hcd.c:774
call_timer_fn+0xf6/0x210 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers+0x71a/0x910 kernel/time/timer.c:1734
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1747
__do_softirq+0x392/0x7a3 kernel/softirq.c:558
__irq_exit_rcu+0xec/0x170 kernel/softirq.c:636
irq_exit_rcu+0x5/0x20 kernel/softirq.c:648
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 72 c5 bb f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 c7 91 45 f7 65 8b 05 d8 eb ed 75 85 c0 74 3f 48 c7 04 24 0e 36
RSP: 0018:ffffc9000c7ff500 EFLAGS: 00000206
RAX: ebca7a61e4686600 RBX: 1ffff920018ffea4 RCX: ffffffff90bb1903
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffffc9000c7ff590 R08: ffffffff818b13b0 R09: fffffbfff1aa4491
R10: fffffbfff1aa4491 R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffff920018ffea0 R14: ffffc9000c7ff520 R15: 0000000000000246
spin_unlock_irqrestore include/linux/spinlock.h:404 [inline]
rh_queue_status+0x104/0x330 drivers/usb/core/hcd.c:832
rh_urb_enqueue drivers/usb/core/hcd.c:839 [inline]
usb_hcd_submit_urb+0x244/0x5f0 drivers/usb/core/hcd.c:1544
proc_do_submiturb+0x2a87/0x3d80 drivers/usb/core/devio.c:1943
proc_submiturb drivers/usb/core/devio.c:1975 [inline]
usbdev_do_ioctl drivers/usb/core/devio.c:2671 [inline]
usbdev_ioctl+0x397c/0x6d00 drivers/usb/core/devio.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7ff0225bdae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff01fb33188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ff0226d0f60 RCX: 00007ff0225bdae9
RDX: 0000000020000000 RSI: 000000008038550a RDI: 0000000000000003
RBP: 00007ff022617f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffddb14bdf R14: 00007ff01fb33300 R15: 0000000000022000
Allocated by task 23019:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:513
kasan_kmalloc include/linux/kasan.h:269 [inline]
__kmalloc+0x253/0x380 mm/slub.c:4423
kmalloc include/linux/slab.h:595 [inline]
proc_do_submiturb+0x237d/0x3d80 drivers/usb/core/devio.c:1816
proc_submiturb drivers/usb/core/devio.c:1975 [inline]
usbdev_do_ioctl drivers/usb/core/devio.c:2671 [inline]
usbdev_ioctl+0x397c/0x6d00 drivers/usb/core/devio.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
The buggy address belongs to the object at ffff88801a4e95f0
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
8-byte region [ffff88801a4e95f0, ffff88801a4e95f8)
The buggy address belongs to the page:
page:ffffea0000693a40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a4e9
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea000068aa80 dead000000000002 ffff888011441280
raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY), pid 22, ts 6263969278, free_ts 0
prep_new_page mm/page_alloc.c:2418 [inline]
get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4149
__alloc_pages+0x255/0x580 mm/page_alloc.c:5369
alloc_slab_page mm/slub.c:1793 [inline]
allocate_slab+0xcc/0x4d0 mm/slub.c:1930
new_slab mm/slub.c:1993 [inline]
___slab_alloc+0x41e/0xc40 mm/slub.c:3022
__slab_alloc mm/slub.c:3109 [inline]
slab_alloc_node mm/slub.c:3200 [inline]
slab_alloc mm/slub.c:3242 [inline]
__kmalloc_track_caller+0x2d4/0x370 mm/slub.c:4925
kstrdup+0x31/0x70 mm/util.c:60
smack_inode_init_security+0x3a5/0x470 security/smack/smack_lsm.c:987
security_inode_init_security+0x15d/0x3c0 security/security.c:1089
shmem_mknod+0xb0/0x1b0 mm/shmem.c:2832
vfs_mknod+0x51e/0x710 fs/namei.c:3761
handle_create drivers/base/devtmpfs.c:215 [inline]
handle drivers/base/devtmpfs.c:380 [inline]
devtmpfs_work_loop+0x921/0x1080 drivers/base/devtmpfs.c:395
devtmpfsd+0x44/0x50 drivers/base/devtmpfs.c:437
kthread+0x468/0x490 kernel/kthread.c:327
ret_from_fork+0x1f/0x30
page_owner free stack trace missing
Memory state around the buggy address:
ffff88801a4e9480: fc 00 fc fc fc fc fa fc fc fc fc 00 fc fc fc fc
ffff88801a4e9500: fb fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00
>ffff88801a4e9580: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 01 fc
^
ffff88801a4e9600: fc fc fc fb fc fc fc fc 00 fc fc fc fc 00 fc fc
ffff88801a4e9680: fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 9c pushfq
1: 8f 44 24 20 popq 0x20(%rsp)
5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1)
a: 74 08 je 0x14
c: 4c 89 f7 mov %r14,%rdi
f: e8 72 c5 bb f7 callq 0xf7bbc586
14: f6 44 24 21 02 testb $0x2,0x21(%rsp)
19: 75 4e jne 0x69
1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 c7 91 45 f7 callq 0xf74591f6 <-- trapping instruction
2f: 65 8b 05 d8 eb ed 75 mov %gs:0x75edebd8(%rip),%eax # 0x75edec0e
36: 85 c0 test %eax,%eax
38: 74 3f je 0x79
3a: 48 rex.W
3b: c7 .byte 0xc7
3c: 04 24 add $0x24,%al
3e: 0e (bad)
3f: 36 ss