================================================================== BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x243/0x530 drivers/usb/core/hcd.c:774 Write of size 2 at addr ffff888075104bb8 by task syz-executor.2/9466 CPU: 0 PID: 9466 Comm: syz-executor.2 Not tainted 5.16.0-rc7-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+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x380 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:450 kasan_check_range+0x2b5/0x2f0 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 usb_hcd_poll_rh_status+0x243/0x530 drivers/usb/core/hcd.c:774 call_timer_fn+0xf6/0x210 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers+0x71a/0x910 kernel/time/timer.c:1734 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1747 __do_softirq+0x392/0x7a3 kernel/softirq.c:558 __irq_exit_rcu+0xec/0x170 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:__schedule+0xb7a/0x1460 kernel/sched/core.c:6261 Code: 40 0a 00 00 fc 4c 89 fe 48 8d 94 24 a0 00 00 00 e8 ab 95 50 f7 48 8b 7c 24 08 4c 89 fe e8 1e 56 f4 f6 48 89 c7 e8 f6 e2 4e f7 <48> c7 44 24 60 0e 36 e0 45 48 b8 00 00 00 00 00 fc ff df 48 8b 4c RSP: 0018:ffffc9000373f0e0 EFLAGS: 00000282 RAX: 1ffff11005dc0d00 RBX: ffff88802ee05c10 RCX: ffffffff90bb6903 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff88802ee06c80 RBP: ffffc9000373f1f0 R08: ffffffff818b1ab0 R09: ffffed10173472b9 R10: ffffed10173472b9 R11: 0000000000000000 R12: 1ffff110047c70a2 R13: ffff88802ee05c18 R14: ffff888023e38510 R15: ffff888023e38000 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6668 irqentry_exit+0x56/0x90 kernel/entry/common.c:425 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:__ref_is_percpu include/linux/percpu-refcount.h:174 [inline] RIP: 0010:percpu_ref_get_many include/linux/percpu-refcount.h:204 [inline] RIP: 0010:percpu_ref_get include/linux/percpu-refcount.h:222 [inline] RIP: 0010:css_get include/linux/cgroup.h:324 [inline] RIP: 0010:charge_memcg+0x18b/0x4a0 mm/memcontrol.c:6670 Code: c7 e0 3d 7e 8a be b2 02 00 00 48 c7 c2 20 3e 7e 8a e8 b9 6a 92 ff 48 8b 04 24 48 8d 58 10 48 89 d8 48 c1 e8 03 42 80 3c 38 00 <74> 08 48 89 df e8 3b f3 fa ff 48 8b 03 a8 03 0f 85 31 02 00 00 65 RSP: 0018:ffffc9000373f380 EFLAGS: 00000246 RAX: 1ffff11005bcf002 RBX: ffff88802de78010 RCX: ffff88802ee06158 RDX: 0000000000000001 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc9000373f430 R08: dffffc0000000000 R09: fffffbfff1ff3ddd R10: fffffbfff1ff3ddd R11: 0000000000000000 R12: 0000000000000cc0 R13: ffffea000185bf40 R14: 1ffff920006e7e74 R15: dffffc0000000000 __mem_cgroup_charge+0x23/0x80 mm/memcontrol.c:6687 mem_cgroup_charge include/linux/memcontrol.h:713 [inline] shmem_add_to_page_cache+0xb56/0x1670 mm/shmem.c:712 shmem_getpage_gfp+0x1816/0x28c0 mm/shmem.c:1936 shmem_getpage mm/shmem.c:150 [inline] shmem_file_read_iter+0x2db/0x890 mm/shmem.c:2547 call_read_iter include/linux/fs.h:2156 [inline] generic_file_splice_read+0x482/0x760 fs/splice.c:311 do_splice_to fs/splice.c:796 [inline] splice_direct_to_actor+0x45f/0xd00 fs/splice.c:870 do_splice_direct+0x291/0x3e0 fs/splice.c:979 do_sendfile+0x6fe/0x1040 fs/read_write.c:1245 __do_sys_sendfile64 fs/read_write.c:1310 [inline] __se_sys_sendfile64+0x171/0x1d0 fs/read_write.c:1296 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f58c82e0e99 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:00007f58c6c56168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f58c83f3f60 RCX: 00007f58c82e0e99 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000005 RBP: 00007f58c833aff1 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000001ffe00 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd7b508bbf R14: 00007f58c6c56300 R15: 0000000000022000 Allocated by task 9467: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:269 [inline] __kmalloc+0x253/0x380 mm/slub.c:4423 kmalloc include/linux/slab.h:595 [inline] do_proc_bulk+0x858/0x15d0 drivers/usb/core/devio.c:1292 proc_bulk drivers/usb/core/devio.c:1351 [inline] usbdev_do_ioctl drivers/usb/core/devio.c:2625 [inline] usbdev_ioctl+0x36b7/0x6d00 drivers/usb/core/devio.c:2791 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888075104bb8 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff888075104bb8, ffff888075104bc0) The buggy address belongs to the page: page:ffffea0001d44100 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888075104e38 pfn:0x75104 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000a61b40 dead000000000003 ffff888011441280 raw: ffff888075104e38 0000000080660063 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 3635, ts 148378414585, free_ts 148375825598 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4149 __alloc_pages+0x255/0x580 mm/page_alloc.c:5369 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab+0xcc/0x540 mm/slub.c:1930 new_slab mm/slub.c:1993 [inline] ___slab_alloc+0x41e/0xc40 mm/slub.c:3022 __slab_alloc mm/slub.c:3109 [inline] slab_alloc_node mm/slub.c:3200 [inline] __kmalloc_node+0x2ec/0x420 mm/slub.c:4467 kmalloc_node include/linux/slab.h:613 [inline] __vmalloc_area_node mm/vmalloc.c:2940 [inline] __vmalloc_node_range+0x2cb/0x960 mm/vmalloc.c:3065 __vmalloc_node mm/vmalloc.c:3114 [inline] vzalloc+0x75/0x80 mm/vmalloc.c:3184 __do_replace+0xc2/0xab0 net/ipv6/netfilter/ip6_tables.c:1066 do_replace net/ipv6/netfilter/ip6_tables.c:1157 [inline] do_ip6t_set_ctl+0x2cd3/0x3de0 net/ipv6/netfilter/ip6_tables.c:1639 nf_setsockopt+0x29f/0x2d0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x2914/0x5850 net/ipv6/ipv6_sockglue.c:1017 __sys_setsockopt+0x552/0x980 net/socket.c:2176 __do_sys_setsockopt net/socket.c:2187 [inline] __se_sys_setsockopt net/socket.c:2184 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2184 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 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+0xd1c/0xe00 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x7d/0x580 mm/page_alloc.c:3388 do_slab_free mm/slub.c:3501 [inline] ___cache_free+0xe6/0x120 mm/slub.c:3520 qlist_free_all mm/kasan/quarantine.c:165 [inline] kasan_quarantine_reduce+0x151/0x1c0 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x2f/0xf0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x1c9/0x310 mm/slub.c:3247 getname_flags+0xba/0x650 fs/namei.c:138 user_path_at_empty+0x2a/0x1a0 fs/namei.c:2800 do_readlinkat+0x11b/0x3b0 fs/stat.c:443 __do_sys_readlink fs/stat.c:476 [inline] __se_sys_readlink fs/stat.c:473 [inline] __x64_sys_readlink+0x7b/0x90 fs/stat.c:473 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888075104a80: fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc ffff888075104b00: fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc fc >ffff888075104b80: fc fc fa fc fc fc fc 01 fc fc fc fc fa fc fc fc ^ ffff888075104c00: fc fa fc fc fc fc fa fc fc fc fc fb fc fc fc fc ffff888075104c80: fa fc fc fc fc fa fc fc fc fc fa fc fc fc fc fa ================================================================== ---------------- Code disassembly (best guess): 0: 40 0a 00 or (%rax),%al 3: 00 fc add %bh,%ah 5: 4c 89 fe mov %r15,%rsi 8: 48 8d 94 24 a0 00 00 lea 0xa0(%rsp),%rdx f: 00 10: e8 ab 95 50 f7 callq 0xf75095c0 15: 48 8b 7c 24 08 mov 0x8(%rsp),%rdi 1a: 4c 89 fe mov %r15,%rsi 1d: e8 1e 56 f4 f6 callq 0xf6f45640 22: 48 89 c7 mov %rax,%rdi 25: e8 f6 e2 4e f7 callq 0xf74ee320 * 2a: 48 c7 44 24 60 0e 36 movq $0x45e0360e,0x60(%rsp) <-- trapping instruction 31: e0 45 33: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 3a: fc ff df 3d: 48 rex.W 3e: 8b .byte 0x8b 3f: 4c rex.WR