================================================================== BUG: KASAN: slab-out-of-bounds in ar5523_cmd_tx_cb+0x220/0x240 drivers/net/wireless/ath/ar5523/ar5523.c:228 Read of size 8 at addr ffff88813db47450 by task syz-executor.2/1309 CPU: 0 PID: 1309 Comm: syz-executor.2 Not tainted 5.19.0-syzkaller-13666-gffcf9c5700e4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 ar5523_cmd_tx_cb+0x220/0x240 drivers/net/wireless/ath/ar5523/ar5523.c:228 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1671 usb_hcd_giveback_urb+0x380/0x430 drivers/usb/core/hcd.c:1754 dummy_timer+0x11ff/0x32c0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x674/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x1c0/0x9a9 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x113/0x170 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:finish_task_switch.isra.0+0x24a/0xa00 kernel/sched/core.c:5062 Code: 8b 3a 4c 89 e7 48 c7 02 00 00 00 00 ff d1 4d 85 ff 75 bf 4c 89 e7 e8 75 2d d5 04 e8 00 37 2c 00 fb 65 48 8b 1c 25 c0 6e 02 00 <48> 8d bb 98 14 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc900005d7b30 EFLAGS: 00000206 RAX: 0000000002f1ce55 RBX: ffff888111809c80 RCX: 1ffffffff11bcbf1 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc900005d7b78 R08: 0000000000000001 R09: 0000000000000001 R10: ffffed103ed06f60 R11: 0000000000000000 R12: ffff8881f6837b00 R13: ffff8881118e5580 R14: 0000000000000000 R15: ffff8881f68384f8 context_switch kernel/sched/core.c:5185 [inline] __schedule+0x947/0x26f0 kernel/sched/core.c:6494 schedule+0xda/0x1b0 kernel/sched/core.c:6570 freezable_schedule include/linux/freezer.h:172 [inline] do_nanosleep+0x197/0x690 kernel/time/hrtimer.c:2044 hrtimer_nanosleep+0x1f9/0x4a0 kernel/time/hrtimer.c:2097 common_nsleep+0xa2/0xc0 kernel/time/posix-timers.c:1236 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1276 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1254 [inline] __x64_sys_clock_nanosleep+0x2f4/0x430 kernel/time/posix-timers.c:1254 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff7e204ff4a Code: 83 ff 03 74 3b 48 83 ec 28 b8 fa ff ff ff 83 ff 02 49 89 ca 0f 44 f8 64 8b 04 25 18 00 00 00 85 c0 75 2d b8 e6 00 00 00 0f 05 <89> c2 f7 da 3d 00 f0 ff ff b8 00 00 00 00 0f 47 c2 48 83 c4 28 c3 RSP: 002b:00007ffc6d5a8d40 EFLAGS: 00000246 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 000000000000132a RCX: 00007ff7e204ff4a RDX: 00007ffc6d5a8d80 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffc6d5a8e0c R08: 0000000000000ac3 R09: 00007ffc6d5d5080 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000059 R13: 00000000002a0682 R14: 000000000000000a R15: 00007ffc6d5a8e70 Allocated by task 0: (stack is not available) The buggy address belongs to the object at ffff88813db47400 which belongs to the cache kmalloc-cg-512 of size 512 The buggy address is located 80 bytes inside of 512-byte region [ffff88813db47400, ffff88813db47600) The buggy address belongs to the physical page: page:ffffea0004f6d100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13db44 head:ffffea0004f6d100 order:2 compound_mapcount:0 compound_pincount:0 memcg:ffff88811a4bf201 flags: 0x200000000010200(slab|head|node=0|zone=2) raw: 0200000000010200 0000000000000000 dead000000000122 ffff888100042dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff ffff88811a4bf201 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 24420, tgid 24420 (udevd), ts 2755219670842, free_ts 2754985339078 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x11cc/0x2a20 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1824 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x7b4/0xda0 mm/slub.c:3031 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3118 slab_alloc_node mm/slub.c:3209 [inline] __kmalloc_node_track_caller+0x139/0x360 mm/slub.c:4955 kmalloc_reserve net/core/skbuff.c:358 [inline] __alloc_skb+0xd9/0x2f0 net/core/skbuff.c:430 alloc_skb include/linux/skbuff.h:1257 [inline] alloc_skb_with_frags+0x93/0x6c0 net/core/skbuff.c:6018 sock_alloc_send_pskb+0x7a3/0x930 net/core/sock.c:2663 unix_dgram_sendmsg+0x415/0x1b50 net/unix/af_unix.c:1912 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 sock_write_iter+0x291/0x3d0 net/socket.c:1108 call_write_iter include/linux/fs.h:2192 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9e9/0xdd0 fs/read_write.c:578 ksys_write+0x1e8/0x250 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5d2/0xb80 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x420 mm/page_alloc.c:3476 device_release+0x9f/0x240 drivers/base/core.c:2330 kobject_cleanup lib/kobject.c:673 [inline] kobject_release lib/kobject.c:704 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1be/0x4c0 lib/kobject.c:721 put_device+0x1b/0x30 drivers/base/core.c:3624 ar5523_probe+0xe38/0x1d10 drivers/net/wireless/ath/ar5523/ar5523.c:1719 usb_probe_interface+0x30b/0x7f0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:530 [inline] really_probe+0x249/0xb90 drivers/base/dd.c:609 __driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:748 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:778 __device_attach_driver+0x206/0x2e0 drivers/base/dd.c:901 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427 __device_attach+0x1e4/0x530 drivers/base/dd.c:973 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487 device_add+0xbd5/0x1e90 drivers/base/core.c:3517 usb_set_configuration+0x1019/0x1900 drivers/usb/core/message.c:2170 Memory state around the buggy address: ffff88813db47300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813db47380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88813db47400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88813db47480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813db47500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 8b 3a mov (%rdx),%edi 2: 4c 89 e7 mov %r12,%rdi 5: 48 c7 02 00 00 00 00 movq $0x0,(%rdx) c: ff d1 callq *%rcx e: 4d 85 ff test %r15,%r15 11: 75 bf jne 0xffffffd2 13: 4c 89 e7 mov %r12,%rdi 16: e8 75 2d d5 04 callq 0x4d52d90 1b: e8 00 37 2c 00 callq 0x2c3720 20: fb sti 21: 65 48 8b 1c 25 c0 6e mov %gs:0x26ec0,%rbx 28: 02 00 * 2a: 48 8d bb 98 14 00 00 lea 0x1498(%rbx),%rdi <-- trapping instruction 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 48 89 fa mov %rdi,%rdx 3e: 48 rex.W 3f: c1 .byte 0xc1