==================================================================
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 ffff888074be7580 by task syz-executor.5/12563
CPU: 0 PID: 12563 Comm: syz-executor.5 Not tainted 5.16.0-rc3-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: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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 3a df 14 f8 48 89 ef e8 82 55 15 f8 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 43 1e 08 f8 65 8b 05 4c 5c bb 76 85 c0 74 0a 5b 5d c3 e8 60 15
RSP: 0018:ffffc90002857d08 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff1b218c1
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffffffff906db168 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff817d2958 R11: 0000000000000000 R12: ffffffff906db160
R13: ffffffff89adede0 R14: ffffc90002857d98 R15: ffffffff906db168
debug_object_free lib/debugobjects.c:852 [inline]
debug_object_free+0x1c0/0x350 lib/debugobjects.c:825
destroy_hrtimer_on_stack kernel/time/hrtimer.c:452 [inline]
hrtimer_nanosleep+0x22b/0x4a0 kernel/time/hrtimer.c:2112
common_nsleep+0xa2/0xc0 kernel/time/posix-timers.c:1227
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1245 [inline]
__x64_sys_clock_nanosleep+0x2f4/0x430 kernel/time/posix-timers.c:1245
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:0x7feb265e9811
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 aa e7 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 e3 e7 ff ff 48 8b 04 24 eb 97 66 2e 0f 1f
RSP: 002b:00007ffe0255c210 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 000000000000193b RCX: 00007feb265e9811
RDX: 00007ffe0255c250 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffe0255c2dc R08: 0000000000000000 R09: 00007ffe0255e080
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 000000000024090c R14: 0000000000000005 R15: 00007ffe0255c340
Allocated by task 24792:
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 ffff888074be7580
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
32-byte region [ffff888074be7580, ffff888074be75a0)
The buggy address belongs to the page:
page:ffffea0001d2f9c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888074be7fc1 pfn:0x74be7
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001d39fc8 ffffea000077e2c8 ffff888010c40100
raw: ffff888074be7fc1 ffff888074be7000 000000010000003f 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 0x342220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 24769, ts 2360946364008, free_ts 2360862528639
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]
kmem_cache_alloc_trace+0x380/0x4a0 mm/slab.c:3573
kmalloc include/linux/slab.h:590 [inline]
proc_self_get_link+0x187/0x1f0 fs/proc/self.c:22
pick_link fs/namei.c:1765 [inline]
step_into+0x14e1/0x1c80 fs/namei.c:1826
walk_component+0x171/0x6a0 fs/namei.c:1976
link_path_walk.part.0+0x757/0xd00 fs/namei.c:2297
link_path_walk fs/namei.c:2222 [inline]
path_openat+0x263/0x2750 fs/namei.c:3555
do_filp_open+0x1aa/0x400 fs/namei.c:3586
do_sys_openat2+0x16d/0x4d0 fs/open.c:1212
do_sys_open fs/open.c:1228 [inline]
__do_sys_openat fs/open.c:1244 [inline]
__se_sys_openat fs/open.c:1239 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1239
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
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
vb2_vmalloc_put drivers/media/common/videobuf2/videobuf2-vmalloc.c:68 [inline]
vb2_vmalloc_put+0x8a/0xc0 drivers/media/common/videobuf2/videobuf2-vmalloc.c:63
__vb2_buf_mem_free+0x10d/0x230 drivers/media/common/videobuf2/videobuf2-core.c:266
__vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:492 [inline]
__vb2_queue_free+0x728/0x9a0 drivers/media/common/videobuf2/videobuf2-core.c:537
vb2_core_queue_release+0x5e/0x70 drivers/media/common/videobuf2/videobuf2-core.c:2433
v4l2_m2m_ctx_release+0x26/0x30 drivers/media/v4l2-core/v4l2-mem2mem.c:1217
vim2m_release+0xe0/0x140 drivers/media/test-drivers/vim2m.c:1245
v4l2_release+0x22c/0x3b0 drivers/media/v4l2-core/v4l2-dev.c:456
__fput+0x286/0x9f0 fs/file_table.c:280
task_work_run+0xdd/0x1a0 kernel/task_work.c:164
exit_task_work include/linux/task_work.h:32 [inline]
do_exit+0xc14/0x2b40 kernel/exit.c:832
do_group_exit+0x125/0x310 kernel/exit.c:929
Memory state around the buggy address:
ffff888074be7480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888074be7500: fc fc fc fc fc fc fc fc fa fb fb fb fc fc fc fc
>ffff888074be7580: 01 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc
^
ffff888074be7600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
ffff888074be7680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 74 24 je 0x26
2: 10 e8 adc %ch,%al
4: 3a df cmp %bh,%bl
6: 14 f8 adc $0xf8,%al
8: 48 89 ef mov %rbp,%rdi
b: e8 82 55 15 f8 callq 0xf8155592
10: 81 e3 00 02 00 00 and $0x200,%ebx
16: 75 25 jne 0x3d
18: 9c pushfq
19: 58 pop %rax
1a: f6 c4 02 test $0x2,%ah
1d: 75 2d jne 0x4c
1f: 48 85 db test %rbx,%rbx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 43 1e 08 f8 callq 0xf8081e72 <-- trapping instruction
2f: 65 8b 05 4c 5c bb 76 mov %gs:0x76bb5c4c(%rip),%eax # 0x76bb5c82
36: 85 c0 test %eax,%eax
38: 74 0a je 0x44
3a: 5b pop %rbx
3b: 5d pop %rbp
3c: c3 retq
3d: e8 .byte 0xe8
3e: 60 (bad)
3f: 15 .byte 0x15