==================================================================
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:225 [inline]
BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x376/0x780 drivers/usb/core/hcd.c:774
Write of size 2 at addr ffff888076764000 by task syz-executor.2/2949
CPU: 1 PID: 2949 Comm: syz-executor.2 Not tainted 5.16.0-rc4-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+0xcd/0x134 lib/dump_stack.c:106
print_address_description.constprop.0.cold+0x8d/0x2ed mm/kasan/report.c:247
__kasan_report mm/kasan/report.c:433 [inline]
kasan_report.cold+0x83/0xdf mm/kasan/report.c:450
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
memcpy+0x39/0x60 mm/kasan/shadow.c:66
memcpy include/linux/fortify-string.h:225 [inline]
usb_hcd_poll_rh_status+0x376/0x780 drivers/usb/core/hcd.c:774
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
RIP: 0010:do_raw_spin_lock+0x6d/0x2b0 kernel/locking/spinlock_debug.c:114
Code: 14 03 c7 02 f1 f1 f1 f1 c7 42 04 04 f3 f3 f3 48 89 fa 65 48 8b 0c 25 28 00 00 00 48 89 4c 24 60 31 c9 48 c1 ea 03 0f b6 14 02 <48> 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 db 01 00 00 8b
RSP: 0018:ffffc90004907da0 EFLAGS: 00000a07
RAX: dffffc0000000000 RBX: 1ffff92000920fb5 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff888043f39c44
RBP: ffff888043f39c40 R08: 0000000000000000 R09: ffffffff8ff76a1f
R10: fffffbfff1feed43 R11: 0000000000000000 R12: 0000000000000025
R13: ffff888043f39b80 R14: ffff888043f39c40 R15: ffff88801a3360c0
spin_lock include/linux/spinlock.h:349 [inline]
pick_file+0x24/0x1f0 fs/file.c:614
__range_close fs/file.c:679 [inline]
__close_range+0x34e/0x730 fs/file.c:749
__do_sys_close_range fs/open.c:1367 [inline]
__se_sys_close_range fs/open.c:1364 [inline]
__x64_sys_close_range+0x6f/0xb0 fs/open.c:1364
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f288428baf9
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:00007f2883201188 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: ffffffffffffffda RBX: 00007f288439ef60 RCX: 00007f288428baf9
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000004
RBP: 00007f28842e5ff7 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd3a0e3cdf R14: 00007f2883201300 R15: 0000000000022000
Allocated by task 2949:
kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
____kasan_kmalloc mm/kasan/common.c:472 [inline]
__kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:522
kasan_kmalloc include/linux/kasan.h:269 [inline]
__do_kmalloc mm/slab.c:3702 [inline]
__kmalloc+0x209/0x4d0 mm/slab.c:3711
kmalloc include/linux/slab.h:595 [inline]
proc_do_submiturb+0x2a49/0x35f0 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+0x692/0x36c0 drivers/usb/core/devio.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
The buggy address belongs to the object at ffff888076764000
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
32-byte region [ffff888076764000, ffff888076764020)
The buggy address belongs to the page:
page:ffffea0001d9d900 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888076764fc1 pfn:0x76764
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001d1d5c8 ffffea000075a988 ffff888010c40100
raw: ffff888076764fc1 ffff888076764000 0000000100000037 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 0x242220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 9286, ts 200496859583, free_ts 199273722715
prep_new_page mm/page_alloc.c:2418 [inline]
get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369
__alloc_pages_node include/linux/gfp.h:570 [inline]
kmem_getpages mm/slab.c:1377 [inline]
cache_grow_begin+0x75/0x470 mm/slab.c:2593
cache_alloc_refill+0x27f/0x380 mm/slab.c:2965
____cache_alloc mm/slab.c:3048 [inline]
____cache_alloc mm/slab.c:3031 [inline]
__do_cache_alloc mm/slab.c:3275 [inline]
slab_alloc mm/slab.c:3316 [inline]
__do_kmalloc mm/slab.c:3700 [inline]
__kmalloc_track_caller+0x3b0/0x4d0 mm/slab.c:3717
kstrdup+0x36/0x70 mm/util.c:60
security_netlbl_sid_to_secattr+0x1ce/0x460 security/selinux/ss/services.c:3975
selinux_netlbl_sock_genattr+0xf0/0x4b0 security/selinux/netlabel.c:80
selinux_netlbl_socket_post_create+0x73/0x160 security/selinux/netlabel.c:401
selinux_socket_post_create+0x4de/0x7c0 security/selinux/hooks.c:4696
security_socket_post_create+0x64/0xc0 security/security.c:2175
__sock_create+0x64a/0x790 net/socket.c:1480
udp_sock_create6+0xc5/0x690 net/ipv6/ip6_udp_tunnel.c:23
udp_sock_create include/net/udp_tunnel.h:62 [inline]
rxrpc_open_socket+0x1fb/0x590 net/rxrpc/local_object.c:129
rxrpc_lookup_local+0x898/0x1050 net/rxrpc/local_object.c:226
rxrpc_sendmsg+0x369/0x630 net/rxrpc/af_rxrpc.c:542
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1338 [inline]
free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389
free_unref_page_prepare mm/page_alloc.c:3309 [inline]
free_unref_page+0x19/0x690 mm/page_alloc.c:3388
__vunmap+0x781/0xb70 mm/vmalloc.c:2632
__vfree+0x3c/0xd0 mm/vmalloc.c:2680
vfree+0x5a/0x90 mm/vmalloc.c:2711
kvfree+0x2e/0x50 mm/util.c:618
process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
kthread+0x405/0x4f0 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888076763f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888076763f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888076764000: 01 fc fc fc fc fc fc fc fa fb fb fb fc fc fc fc
^
ffff888076764080: 00 03 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc
ffff888076764100: 05 fc fc fc fc fc fc fc 00 00 00 00 fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 14 03 adc $0x3,%al
2: c7 02 f1 f1 f1 f1 movl $0xf1f1f1f1,(%rdx)
8: c7 42 04 04 f3 f3 f3 movl $0xf3f3f304,0x4(%rdx)
f: 48 89 fa mov %rdi,%rdx
12: 65 48 8b 0c 25 28 00 mov %gs:0x28,%rcx
19: 00 00
1b: 48 89 4c 24 60 mov %rcx,0x60(%rsp)
20: 31 c9 xor %ecx,%ecx
22: 48 c1 ea 03 shr $0x3,%rdx
26: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
* 2a: 48 89 f8 mov %rdi,%rax <-- trapping instruction
2d: 83 e0 07 and $0x7,%eax
30: 83 c0 03 add $0x3,%eax
33: 38 d0 cmp %dl,%al
35: 7c 08 jl 0x3f
37: 84 d2 test %dl,%dl
39: 0f 85 db 01 00 00 jne 0x21a
3f: 8b .byte 0x8b