================================================================== 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 ffff8880209ea050 by task syz-executor.2/22613 CPU: 1 PID: 22613 Comm: syz-executor.2 Not tainted 5.16.0-rc2-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:636 irq_exit_rcu+0x5/0x20 kernel/softirq.c:648 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:tomoyo_check_acl+0xbd/0x430 security/tomoyo/domain.c:173 Code: 49 39 dc 0f 84 14 02 00 00 0f 1f 40 00 49 8d 6c 24 18 48 89 e8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 1d 01 00 00 0f b6 6d 00 <31> ff 89 ee e8 8a 62 a7 fd 85 ed 74 16 e8 b1 5f a7 fd e9 c6 00 00 RSP: 0018:ffffc9000290f4f8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff88801cf68990 RCX: 0000000000040000 RDX: ffffc9000da3b000 RSI: 00000000000013f0 RDI: 00000000000013f1 RBP: 0000000000000000 R08: ffffffff83dd1846 R09: ffffffff83deb412 R10: 0000000000000002 R11: ffff88801f600000 R12: ffff88807872b400 R13: dffffc0000000000 R14: ffff88801cf68980 R15: 0000000000000000 tomoyo_path_permission+0x1af/0x370 security/tomoyo/file.c:586 tomoyo_check_open_permission+0x353/0x490 security/tomoyo/file.c:780 security_file_open+0x50/0x570 security/security.c:1635 do_dentry_open+0x350/0x1020 fs/open.c:809 do_open fs/namei.c:3426 [inline] path_openat+0x2896/0x3660 fs/namei.c:3559 do_filp_open+0x277/0x4f0 fs/namei.c:3586 do_sys_openat2+0x13b/0x500 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+0x243/0x290 fs/open.c:1239 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:0x7f1d20978a04 Code: 84 00 00 00 00 00 44 89 54 24 0c e8 96 f9 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 89 44 24 0c e8 c8 f9 ff ff 8b 44 RSP: 002b:00007f1d1df3acc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 6666666666666667 RCX: 00007f1d20978a04 RDX: 0000000000068001 RSI: 00007f1d1df3ad60 RDI: 00000000ffffff9c RBP: 00007f1d1df3ad60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000068001 R13: 00007fffafdfc69f R14: 00007f1d1df3b300 R15: 0000000000022000 Allocated by task 22614: 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] proc_do_submiturb+0x237d/0x3d80 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+0x397c/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 ffff8880209ea050 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff8880209ea050, ffff8880209ea058) The buggy address belongs to the page: page:ffffea0000827a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x209ea flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff888011441280 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 2976, ts 289990762111, free_ts 289986969547 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/0x4d0 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] kvmalloc_node+0x81/0x110 mm/util.c:587 kvmalloc include/linux/slab.h:741 [inline] kvmalloc_array include/linux/slab.h:759 [inline] pidlist_array_load kernel/cgroup/cgroup-v1.c:345 [inline] cgroup_pidlist_start+0x400/0x10d0 kernel/cgroup/cgroup-v1.c:419 kernfs_seq_start+0x175/0x3b0 fs/kernfs/file.c:118 seq_read_iter+0x401/0xdc0 fs/seq_file.c:225 call_read_iter include/linux/fs.h:2156 [inline] new_sync_read fs/read_write.c:400 [inline] vfs_read+0xaf9/0xe60 fs/read_write.c:481 ksys_read+0x18f/0x2c0 fs/read_write.c:619 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 mm_free_pgd kernel/fork.c:647 [inline] __mmdrop+0xae/0x3f0 kernel/fork.c:698 exit_mm+0x211/0x2f0 kernel/exit.c:507 do_exit+0x688/0x24f0 kernel/exit.c:819 do_group_exit+0x168/0x2d0 kernel/exit.c:929 __do_sys_exit_group+0x13/0x20 kernel/exit.c:940 __ia32_sys_exit_group+0x0/0x40 kernel/exit.c:938 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:938 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: ffff8880209e9f00: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ffff8880209e9f80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880209ea000: 00 fc fc fc fc fa fc fc fc fc 01 fc fc fc fc fa ^ ffff8880209ea080: fc fc fc fc fa fc fc fc fc fb fc fc fc fc fa fc ffff8880209ea100: fc fc fc 00 fc fc fc fc fa fc fc fc fc fa fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 49 39 dc cmp %rbx,%r12 3: 0f 84 14 02 00 00 je 0x21d 9: 0f 1f 40 00 nopl 0x0(%rax) d: 49 8d 6c 24 18 lea 0x18(%r12),%rbp 12: 48 89 e8 mov %rbp,%rax 15: 48 c1 e8 03 shr $0x3,%rax 19: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 1e: 84 c0 test %al,%al 20: 0f 85 1d 01 00 00 jne 0x143 26: 0f b6 6d 00 movzbl 0x0(%rbp),%ebp * 2a: 31 ff xor %edi,%edi <-- trapping instruction 2c: 89 ee mov %ebp,%esi 2e: e8 8a 62 a7 fd callq 0xfda762bd 33: 85 ed test %ebp,%ebp 35: 74 16 je 0x4d 37: e8 b1 5f a7 fd callq 0xfda75fed 3c: e9 .byte 0xe9 3d: c6 00 00 movb $0x0,(%rax)