================================================================== BUG: KASAN: slab-out-of-bounds in read_descriptors+0x23c/0x290 drivers/usb/core/sysfs.c:884 Read of size 2 at addr ffff0000db22a2aa by task udevd/6223 CPU: 0 PID: 6223 Comm: udevd Not tainted 6.4.0-rc6-syzkaller-00242-g1639fae5132b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 __asan_report_load2_noabort+0x20/0x2c mm/kasan/report_generic.c:379 read_descriptors+0x23c/0x290 drivers/usb/core/sysfs.c:884 sysfs_kf_bin_read+0x19c/0x1d4 fs/sysfs/file.c:97 kernfs_file_read_iter fs/kernfs/file.c:251 [inline] kernfs_fop_read_iter+0x3ac/0x5c8 fs/kernfs/file.c:280 call_read_iter include/linux/fs.h:1862 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x5bc/0x8ac fs/read_write.c:470 ksys_read+0x15c/0x26c fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __arm64_sys_read+0x7c/0x90 fs/read_write.c:621 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 9: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0xcc/0x1b8 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] usb_get_configuration+0xd8/0x4054 drivers/usb/core/config.c:882 usb_enumerate_device drivers/usb/core/hub.c:2407 [inline] usb_new_device+0x134/0x142c drivers/usb/core/hub.c:2545 hub_port_connect drivers/usb/core/hub.c:5407 [inline] hub_port_connect_change drivers/usb/core/hub.c:5551 [inline] port_event drivers/usb/core/hub.c:5711 [inline] hub_event+0x25e4/0x474c drivers/usb/core/hub.c:5793 process_one_work+0x788/0x12d4 kernel/workqueue.c:2405 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2552 kthread+0x288/0x310 kernel/kthread.c:379 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:491 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:501 __call_rcu_common kernel/rcu/tree.c:2627 [inline] call_rcu+0x104/0xaf4 kernel/rcu/tree.c:2741 __qdisc_destroy+0x284/0x4b8 net/sched/sch_generic.c:1070 qdisc_put net/sched/sch_generic.c:1090 [inline] shutdown_scheduler_queue+0x168/0x200 net/sched/sch_generic.c:1143 netdev_for_each_tx_queue include/linux/netdevice.h:2517 [inline] dev_shutdown+0xa0/0x480 net/sched/sch_generic.c:1475 unregister_netdevice_many_notify+0x7f8/0x17b8 net/core/dev.c:10874 unregister_netdevice_many net/core/dev.c:10940 [inline] default_device_exit_batch+0x6c8/0x744 net/core/dev.c:11393 ops_exit_list net/core/net_namespace.c:175 [inline] cleanup_net+0x5dc/0x8d0 net/core/net_namespace.c:614 process_one_work+0x788/0x12d4 kernel/workqueue.c:2405 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2552 kthread+0x288/0x310 kernel/kthread.c:379 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the object at ffff0000db22a000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 2 bytes to the right of allocated 680-byte region [ffff0000db22a000, ffff0000db22a2a8) The buggy address belongs to the physical page: page:00000000b2ce2b94 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b228 head:00000000b2ce2b94 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c0002780 fffffc0003780400 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000db22a180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000db22a200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000db22a280: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000db22a300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000db22a380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Unable to handle kernel paging request at virtual address 006e6f432074736f Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [006e6f432074736f] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6223 Comm: udevd Tainted: G B 6.4.0-rc6-syzkaller-00242-g1639fae5132b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __memcpy+0x110/0x250 arch/arm64/lib/memcpy.S:155 lr : __asan_memcpy+0x68/0x84 mm/kasan/shadow.c:109 sp : ffff80001e937970 x29: ffff80001e937970 x28: dfff800000000000 x27: 0000000000000fdc x26: 0000000000000023 x25: ffff0000d93bd548 x24: 0000000000005a52 x23: 0000000000000000 x22: ffff80000dcd5e98 x21: ffff0000d915a024 x20: 746e6f432074736f x19: 0000000000000fdc x18: 1fffe0003685bbbe x17: 0000000000000000 x16: ffff8000122c14f0 x15: 0000000000000001 x14: 8b9090bdb8a12cb5 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: ffff60001b22b600 x9 : 0000000000000000 x8 : 0000000000000001 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff0000d915b000 x4 : 746e6f432074834b x3 : ffff80000dcd5e98 x2 : 0000000000000fdc x1 : 746e6f432074736f x0 : ffff0000d915a024 Call trace: __memcpy+0x110/0x250 arch/arm64/lib/memcpy.S:151 read_descriptors+0x1bc/0x290 drivers/usb/core/sysfs.c:889 sysfs_kf_bin_read+0x19c/0x1d4 fs/sysfs/file.c:97 kernfs_file_read_iter fs/kernfs/file.c:251 [inline] kernfs_fop_read_iter+0x3ac/0x5c8 fs/kernfs/file.c:280 call_read_iter include/linux/fs.h:1862 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x5bc/0x8ac fs/read_write.c:470 ksys_read+0x15c/0x26c fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __arm64_sys_read+0x7c/0x90 fs/read_write.c:621 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Code: cb01000e b4fffc2e eb0201df 540004a3 (a940342c) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: cb01000e sub x14, x0, x1 4: b4fffc2e cbz x14, 0xffffffffffffff88 8: eb0201df cmp x14, x2 c: 540004a3 b.cc 0xa0 // b.lo, b.ul, b.last * 10: a940342c ldp x12, x13, [x1] <-- trapping instruction