================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:372 [inline] BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x326/0x630 drivers/usb/core/hcd.c:782 Write of size 2 at addr ffff8880b2f63380 by task syz-executor.1/26823 CPU: 0 PID: 26823 Comm: syz-executor.1 Not tainted 4.14.213-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report+0x6f/0x7b mm/kasan/report.c:409 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:372 [inline] usb_hcd_poll_rh_status+0x326/0x630 drivers/usb/core/hcd.c:782 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x254/0xa1d kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:lock_acquire+0x1ec/0x3f0 kernel/locking/lockdep.c:4001 RSP: 0018:ffff88809586f3e0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: 1ffffffff11e1251 RBX: ffff888054e7c580 RCX: c02a250b657a8078 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000286 RBP: ffffffff88f77640 R08: 0000000000000000 R09: 0000000000020012 R10: ffff888054e7ce30 R11: ffff888054e7c580 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:242 [inline] rcu_read_lock include/linux/rcupdate.h:629 [inline] is_bpf_text_address+0x35/0x150 kernel/bpf/core.c:456 kernel_text_address kernel/extable.c:150 [inline] kernel_text_address+0xbd/0xf0 kernel/extable.c:120 __kernel_text_address+0x9/0x30 kernel/extable.c:105 unwind_get_return_address arch/x86/kernel/unwind_orc.c:252 [inline] unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:247 __save_stack_trace+0xa0/0x160 arch/x86/kernel/stacktrace.c:45 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_node_trace+0x153/0x400 mm/slab.c:3661 __do_kmalloc_node mm/slab.c:3681 [inline] __kmalloc_node_track_caller+0x38/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb_fclone include/linux/skbuff.h:1022 [inline] sk_stream_alloc_skb+0xb1/0x760 net/ipv4/tcp.c:855 tso_fragment net/ipv4/tcp_output.c:1860 [inline] tcp_write_xmit+0x1cdb/0x5570 net/ipv4/tcp_output.c:2378 __tcp_push_pending_frames+0xa0/0x2d0 net/ipv4/tcp_output.c:2580 tcp_push_pending_frames include/net/tcp.h:1778 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5132 [inline] tcp_rcv_established+0x71a/0x1810 net/ipv4/tcp_input.c:5581 tcp_v4_do_rcv+0x541/0x7d0 net/ipv4/tcp_ipv4.c:1476 sk_backlog_rcv include/net/sock.h:921 [inline] __release_sock+0x12a/0x350 net/core/sock.c:2269 __sk_flush_backlog+0x22/0x30 net/core/sock.c:2289 sk_flush_backlog include/net/sock.h:1008 [inline] tcp_sendmsg_locked+0x2486/0x2ef0 net/ipv4/tcp.c:1296 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e219 RSP: 002b:00007f3a98f94c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045e219 RDX: 000000000000fe6a RSI: 00000000200012c0 RDI: 0000000000000004 RBP: 000000000119bfd8 R08: 0000000000000000 R09: fffffffffffffe2b R10: 000000000000000e R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffce5914f2f R14: 00007f3a98f959c0 R15: 000000000119bf8c Allocated by task 26858: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] proc_do_submiturb+0x280f/0x3610 drivers/usb/core/devio.c:1684 proc_submiturb drivers/usb/core/devio.c:1841 [inline] usbdev_do_ioctl+0x665/0x2b70 drivers/usb/core/devio.c:2495 usbdev_ioctl+0x21/0x30 drivers/usb/core/devio.c:2599 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 25727: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __put_cred+0x1a1/0x210 kernel/cred.c:151 put_cred include/linux/cred.h:271 [inline] SYSC_faccessat fs/open.c:444 [inline] SyS_faccessat+0x52a/0x680 fs/open.c:353 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880b2f63380 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b2f63380, ffff8880b2f633a0) The buggy address belongs to the page: page:ffffea0002cbd8c0 count:1 mapcount:0 mapping:ffff8880b2f63000 index:0xffff8880b2f63fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b2f63000 ffff8880b2f63fc1 000000010000003f raw: ffffea0002d310e0 ffffea000284c320 ffff88813fe801c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b2f63280: 00 01 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b2f63300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880b2f63380: 01 fc fc fc fc fc fc fc 00 04 fc fc fc fc fc fc ^ ffff8880b2f63400: 00 00 03 fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b2f63480: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================