==================================================================
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 ffff88801d0f0758 by task systemd-udevd/2970
CPU: 0 PID: 2970 Comm: systemd-udevd Not tainted 5.16.0-rc1-next-20211116-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:636
irq_exit_rcu+0x5/0x20 kernel/softirq.c:648
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:write_comp_data kernel/kcov.c:221 [inline]
RIP: 0010:__sanitizer_cov_trace_switch+0x5e/0xf0 kernel/kcov.c:323
Code: bb 03 00 00 00 4d 8b 10 31 c9 65 4c 8b 24 25 40 70 02 00 4d 85 d2 74 6b 4c 89 e6 bf 03 00 00 00 4c 8b 4c 24 20 49 8b 6c c8 10 2d ff ff ff 84 c0 74 47 49 8b 84 24 90 15 00 00 41 8b bc 24 8c
RSP: 0018:ffffc90001d1f840 EFLAGS: 00000206
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000002
RDX: 0000000000000000 RSI: ffff88807a50ba80 RDI: 0000000000000003
RBP: 0000000000000002 R08: ffffffff89fd8d20 R09: ffffffff839fb9d9
R10: 0000000000000007 R11: 0000000000000001 R12: ffff88807a50ba80
R13: 00000000000003de R14: dffffc0000000000 R15: 0000000000000000
tomoyo_domain_quota_is_ok+0x1c9/0x550 security/tomoyo/util.c:1066
tomoyo_supervisor+0x2f2/0xf00 security/tomoyo/common.c:2089
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_permission+0x270/0x3a0 security/tomoyo/file.c:573
tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838
security_inode_getattr+0xcf/0x140 security/security.c:1334
vfs_getattr fs/stat.c:157 [inline]
vfs_statx+0x164/0x390 fs/stat.c:225
vfs_fstatat fs/stat.c:243 [inline]
vfs_lstat include/linux/fs.h:3358 [inline]
__do_sys_newlstat+0x91/0x110 fs/stat.c:398
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:0x7fbb7a73f335
Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89
RSP: 002b:00007ffd80517b98 EFLAGS: 00000246 ORIG_RAX: 0000000000000006
RAX: ffffffffffffffda RBX: 0000563c2f970e50 RCX: 00007fbb7a73f335
RDX: 00007ffd80517bd0 RSI: 00007ffd80517bd0 RDI: 0000563c2f96fe50
RBP: 00007ffd80517c90 R08: 00007fbb7a9fe2e8 R09: 0000000000001010
R10: 00007fbb7a9fdb58 R11: 0000000000000246 R12: 0000563c2f96fe50
R13: 0000563c2f96fe6a R14: 0000563c2f96fc85 R15: 0000563c2f96fc8a
Allocated by task 15227:
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 ffff88801d0f0758
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
8-byte region [ffff88801d0f0758, ffff88801d0f0760)
The buggy address belongs to the page:
page:ffffea0000743c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801d0f0348 pfn:0x1d0f0
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001e2ff00 dead000000000003 ffff888010c41280
raw: ffff88801d0f0348 0000000080660055 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 8, ts 8819544031, free_ts 8766907224
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+0x1a7/0x300 mm/mempolicy.c:2191
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]
__kmalloc_node+0x2cb/0x390 mm/slub.c:4467
kmalloc_array_node include/linux/slab.h:686 [inline]
kcalloc_node include/linux/slab.h:691 [inline]
blk_mq_realloc_hw_ctxs+0x109/0x1530 block/blk-mq.c:3641
blk_mq_init_allocated_queue+0x324/0x12c0 block/blk-mq.c:3728
blk_mq_init_queue_data block/blk-mq.c:3565 [inline]
blk_mq_init_queue+0x75/0xd0 block/blk-mq.c:3575
scsi_alloc_sdev+0x814/0xd60 drivers/scsi/scsi_scan.c:288
scsi_probe_and_add_lun+0x200b/0x3590 drivers/scsi/scsi_scan.c:1122
__scsi_scan_target+0x21f/0xdb0 drivers/scsi/scsi_scan.c:1604
scsi_scan_channel drivers/scsi/scsi_scan.c:1692 [inline]
scsi_scan_channel+0x148/0x1e0 drivers/scsi/scsi_scan.c:1668
scsi_scan_host_selected+0x2df/0x3b0 drivers/scsi/scsi_scan.c:1721
do_scsi_scan_host+0x1e8/0x260 drivers/scsi/scsi_scan.c:1860
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
free_work+0x58/0x70 mm/vmalloc.c:95
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:
ffff88801d0f0600: fc fc fc 00 fc fc fc fc 00 fc fc fc fc fb fc fc
ffff88801d0f0680: fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc
>ffff88801d0f0700: fc 00 fc fc fc fc 00 fc fc fc fc 01 fc fc fc fc
^
ffff88801d0f0780: 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00
ffff88801d0f0800: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc
==================================================================
----------------
Code disassembly (best guess):
0: bb 03 00 00 00 mov $0x3,%ebx
5: 4d 8b 10 mov (%r8),%r10
8: 31 c9 xor %ecx,%ecx
a: 65 4c 8b 24 25 40 70 mov %gs:0x27040,%r12
11: 02 00
13: 4d 85 d2 test %r10,%r10
16: 74 6b je 0x83
18: 4c 89 e6 mov %r12,%rsi
1b: bf 03 00 00 00 mov $0x3,%edi
20: 4c 8b 4c 24 20 mov 0x20(%rsp),%r9
25: 49 8b 6c c8 10 mov 0x10(%r8,%rcx,8),%rbp
* 2a: e8 2d ff ff ff callq 0xffffff5c <-- trapping instruction
2f: 84 c0 test %al,%al
31: 74 47 je 0x7a
33: 49 8b 84 24 90 15 00 mov 0x1590(%r12),%rax
3a: 00
3b: 41 rex.B
3c: 8b .byte 0x8b
3d: bc .byte 0xbc
3e: 24 8c and $0x8c,%al