==================================================================
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 ffff888012fdbb68 by task syz-executor.0/16269
CPU: 1 PID: 16269 Comm: syz-executor.0 Not tainted 5.16.0-rc2-next-20211124-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/0x320 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:___slab_alloc+0x791/0xfe0 mm/slub.c:3088
Code: 48 89 df e8 51 9c ff ff 41 81 e5 00 02 00 00 0f 85 c0 04 00 00 9c 58 f6 c4 02 0f 85 73 05 00 00 4d 85 ed 74 01 fb 48 8b 45 c8 <65> 48 2b 04 25 28 00 00 00 0f 85 b1 06 00 00 48 8d 65 d0 4c 89 f0
RSP: 0018:ffffc90004577a70 EFLAGS: 00000206
RAX: 2fe12eef6fb7c700 RBX: ffff8880b9d3da00 RCX: 1ffffffff1b22391
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90004577b50 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff817e1b58 R11: 00000000ffffffff R12: 0000000000000001
R13: 0000000000000200 R14: ffff8880831e8000 R15: 000000000003da00
__slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109
slab_alloc_node mm/slub.c:3200 [inline]
slab_alloc mm/slub.c:3242 [inline]
__kmalloc+0x2fb/0x340 mm/slub.c:4419
kmalloc include/linux/slab.h:595 [inline]
tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_number_perm+0x1d5/0x590 security/tomoyo/file.c:723
security_file_ioctl+0x50/0xb0 security/security.c:1541
__do_sys_ioctl fs/ioctl.c:868 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0xb3/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
RIP: 0033:0x7f59d6dfdae9
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:00007f59d4373188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f59d6f10f60 RCX: 00007f59d6dfdae9
RDX: 0000000020001940 RSI: 000000000000890b RDI: 0000000000000005
RBP: 00007f59d6e57f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc7b231e8f R14: 00007f59d4373300 R15: 0000000000022000
Allocated by task 16269:
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+0xa9/0xd0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:595 [inline]
proc_do_submiturb+0x2a7d/0x3630 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 ffff888012fdbb68
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
8-byte region [ffff888012fdbb68, ffff888012fdbb70)
The buggy address belongs to the page:
page:ffffea00004bf6c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12fdb
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0000facfc0 dead000000000002 ffff888010c41280
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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 2264945058, free_ts 2225074279
prep_new_page mm/page_alloc.c:2419 [inline]
get_page_from_freelist+0xa72/0x2f40 mm/page_alloc.c:4150
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5362
alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2037
alloc_pages+0x29f/0x300 mm/mempolicy.c:2187
alloc_slab_page mm/slub.c:1793 [inline]
allocate_slab mm/slub.c:1930 [inline]
new_slab+0x32d/0x4a0 mm/slub.c:1993
___slab_alloc+0x918/0xfe0 mm/slub.c:3022
__slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109
slab_alloc_node mm/slub.c:3200 [inline]
slab_alloc mm/slub.c:3242 [inline]
__kmalloc+0x2fb/0x340 mm/slub.c:4419
acpi_ns_internalize_name drivers/acpi/acpica/nsutils.c:331 [inline]
acpi_ns_internalize_name+0xf2/0x1a1 drivers/acpi/acpica/nsutils.c:312
acpi_ns_get_node_unlocked drivers/acpi/acpica/nsutils.c:666 [inline]
acpi_ns_get_node_unlocked+0x1d8/0x278 drivers/acpi/acpica/nsutils.c:635
acpi_ns_get_node+0x4b/0x6a drivers/acpi/acpica/nsutils.c:726
acpi_ns_evaluate+0xd2/0x966 drivers/acpi/acpica/nseval.c:62
acpi_ut_evaluate_object+0xf1/0x3f6 drivers/acpi/acpica/uteval.c:60
acpi_ut_execute_power_methods+0xd5/0x1e0 drivers/acpi/acpica/uteval.c:288
acpi_get_object_info+0x4e3/0x9dd drivers/acpi/acpica/nsxfname.c:366
acpi_set_pnp_ids drivers/acpi/scan.c:1334 [inline]
acpi_init_device_object+0xb9b/0x1a60 drivers/acpi/scan.c:1747
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1339 [inline]
free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1390
free_unref_page_prepare mm/page_alloc.c:3310 [inline]
free_unref_page+0x19/0x690 mm/page_alloc.c:3389
qlink_free mm/kasan/quarantine.c:146 [inline]
qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165
kasan_quarantine_remove_cache+0xd2/0xf0 mm/kasan/quarantine.c:338
kmem_cache_shrink+0x9/0x20 mm/slab_common.c:525
acpi_os_purge_cache+0x11/0x20 drivers/acpi/osl.c:1663
acpi_purge_cached_objects+0x9b/0xd0 drivers/acpi/acpica/utxface.c:239
acpi_initialize_objects+0x2b/0x95 drivers/acpi/acpica/utxfinit.c:250
acpi_bus_init drivers/acpi/bus.c:1236 [inline]
acpi_init+0x1cd/0x971 drivers/acpi/bus.c:1323
do_one_initcall+0x103/0x650 init/main.c:1303
do_initcall_level init/main.c:1378 [inline]
do_initcalls init/main.c:1394 [inline]
do_basic_setup init/main.c:1413 [inline]
kernel_init_freeable+0x6b1/0x73a init/main.c:1618
kernel_init+0x1a/0x1d0 init/main.c:1507
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888012fdba00: fb fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa
ffff888012fdba80: fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc
>ffff888012fdbb00: fc fc fc 00 fc fc fc fc fa fc fc fc fc 01 fc fc
^
ffff888012fdbb80: fc fc fb fc fc fc fc fb fc fc fc fc fb fc fc fc
ffff888012fdbc00: fc fb fc fc fc fc fb fc fc fc fc fb fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 48 89 df mov %rbx,%rdi
3: e8 51 9c ff ff callq 0xffff9c59
8: 41 81 e5 00 02 00 00 and $0x200,%r13d
f: 0f 85 c0 04 00 00 jne 0x4d5
15: 9c pushfq
16: 58 pop %rax
17: f6 c4 02 test $0x2,%ah
1a: 0f 85 73 05 00 00 jne 0x593
20: 4d 85 ed test %r13,%r13
23: 74 01 je 0x26
25: fb sti
26: 48 8b 45 c8 mov -0x38(%rbp),%rax
* 2a: 65 48 2b 04 25 28 00 sub %gs:0x28,%rax <-- trapping instruction
31: 00 00
33: 0f 85 b1 06 00 00 jne 0x6ea
39: 48 8d 65 d0 lea -0x30(%rbp),%rsp
3d: 4c 89 f0 mov %r14,%rax