================================================================== BUG: KASAN: slab-out-of-bounds in read_descriptors+0x23c/0x290 drivers/usb/core/sysfs.c:884 Read of size 2 at addr ffff0000d94b8aaa by task udevd/5813 CPU: 0 PID: 5813 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 21: 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+0x90/0xa8 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 The buggy address belongs to the object at ffff0000d94b8800 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 [ffff0000d94b8800, ffff0000d94b8aa8) The buggy address belongs to the physical page: page:000000008a18f568 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1194b8 head:000000008a18f568 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 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d94b8980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d94b8a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000d94b8a80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000d94b8b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d94b8b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 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 user pgtable: 4k pages, 48-bit VAs, pgdp=000000011bb86000 [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 5813 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 : ffff80001d137970 x29: ffff80001d137970 x28: dfff800000000000 x27: 0000000000000fdc x26: 0000000000000017 x25: ffff0000c7697548 x24: 0000000000003a72 x23: 0000000000000000 x22: ffff80000d878854 x21: ffff0000d4d36024 x20: 0000000000000000 x19: 0000000000000fdc x18: 1fffe000368de9be x17: 0000000000000000 x16: ffff800011b90e30 x15: 0000000000000001 x14: ffff0000d4d36024 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: ffff60001a9a6e00 x9 : 0000000000000000 x8 : 0000000000000001 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff0000d4d37000 x4 : 0000000000000fdc x3 : ffff80000d878854 x2 : 0000000000000fdc x1 : 0000000000000000 x0 : ffff0000d4d36024 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