==================================================================
BUG: KASAN: use-after-free in ar5523_cmd_tx_cb+0x220/0x240 drivers/net/wireless/ath/ar5523/ar5523.c:228
Read of size 8 at addr ffff8880781af450 by task sshd/3604
CPU: 0 PID: 3604 Comm: sshd Not tainted 6.0.0-rc6-next-20220923-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/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:284 [inline]
print_report+0x15e/0x45d mm/kasan/report.c:395
kasan_report+0xbb/0x1f0 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+0x1da/0x7c0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers.part.0+0x6a2/0xaf0 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+0x1f7/0xad8 kernel/softirq.c:571
do_softirq.part.0+0xde/0x130 kernel/softirq.c:472
do_softirq kernel/softirq.c:464 [inline]
__local_bh_enable_ip+0x102/0x120 kernel/softirq.c:396
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:808 [inline]
ip_finish_output2+0x7d0/0x2170 net/ipv4/ip_output.c:229
__ip_finish_output net/ipv4/ip_output.c:306 [inline]
__ip_finish_output+0x396/0x650 net/ipv4/ip_output.c:288
ip_finish_output+0x2d/0x280 net/ipv4/ip_output.c:316
NF_HOOK_COND include/linux/netfilter.h:291 [inline]
ip_output+0x19f/0x310 net/ipv4/ip_output.c:430
dst_output include/net/dst.h:451 [inline]
ip_local_out net/ipv4/ip_output.c:126 [inline]
__ip_queue_xmit+0x8de/0x1be0 net/ipv4/ip_output.c:532
__tcp_transmit_skb+0x1967/0x3800 net/ipv4/tcp_output.c:1402
tcp_transmit_skb net/ipv4/tcp_output.c:1420 [inline]
tcp_write_xmit+0xd89/0x6050 net/ipv4/tcp_output.c:2691
__tcp_push_pending_frames+0xaa/0x380 net/ipv4/tcp_output.c:2875
tcp_push+0x499/0x720 net/ipv4/tcp.c:728
tcp_sendmsg_locked+0x2439/0x2f90 net/ipv4/tcp.c:1455
tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1483
inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:819
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:2190 [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
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fdf26d259a3
Code: 8b 15 d9 f4 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:00007ffe57c1f998 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000074 RCX: 00007fdf26d259a3
RDX: 0000000000000074 RSI: 0000556870250640 RDI: 0000000000000004
RBP: 0000556870259410 R08: 0000000000000000 R09: 00007ffe57d07080
R10: 00007ffe57d070f0 R11: 0000000000000246 R12: 0000000000000004
R13: 0000000000000001 R14: 00007ffe57c1fa08 R15: 00007ffe57c1fa88
The buggy address belongs to the physical page:
page:ffffea0001e06bc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x781af
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x2800(GFP_NOWAIT|__GFP_NOWARN), pid 3610, tgid 3610 (syz-executor369), ts 46289065833, free_ts 46289067130
prep_new_page mm/page_alloc.c:2538 [inline]
get_page_from_freelist+0x1092/0x2d20 mm/page_alloc.c:4287
__alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5546
alloc_pages+0x1a6/0x270 mm/mempolicy.c:2280
__stack_depot_save+0x3e9/0x560 lib/stackdepot.c:474
kasan_save_stack+0x31/0x40 mm/kasan/common.c:46
kasan_set_track+0x21/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2a/0x40 mm/kasan/generic.c:511
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1669 [inline]
slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1695
slab_free mm/slub.c:3599 [inline]
kmem_cache_free+0xea/0x5b0 mm/slub.c:3621
kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:714
__kfree_skb net/core/skbuff.c:771 [inline]
consume_skb net/core/skbuff.c:935 [inline]
consume_skb+0xcf/0x160 net/core/skbuff.c:929
uevent_net_broadcast_untagged lib/kobject_uevent.c:337 [inline]
kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline]
kobject_uevent_env+0xc6c/0x1640 lib/kobject_uevent.c:593
__device_release_driver drivers/base/dd.c:1264 [inline]
device_release_driver_internal+0x5c9/0x700 drivers/base/dd.c:1275
driver_detach+0xd5/0x1a0 drivers/base/dd.c:1338
bus_remove_driver+0x104/0x300 drivers/base/bus.c:677
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1458 [inline]
free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508
free_unref_page_prepare mm/page_alloc.c:3386 [inline]
free_unref_page+0x19/0x4d0 mm/page_alloc.c:3482
__stack_depot_save+0x169/0x560 lib/stackdepot.c:506
kasan_save_stack+0x31/0x40 mm/kasan/common.c:46
kasan_set_track+0x21/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2a/0x40 mm/kasan/generic.c:511
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1669 [inline]
slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1695
slab_free mm/slub.c:3599 [inline]
kmem_cache_free+0xea/0x5b0 mm/slub.c:3621
kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:714
__kfree_skb net/core/skbuff.c:771 [inline]
consume_skb net/core/skbuff.c:935 [inline]
consume_skb+0xcf/0x160 net/core/skbuff.c:929
uevent_net_broadcast_untagged lib/kobject_uevent.c:337 [inline]
kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline]
kobject_uevent_env+0xc6c/0x1640 lib/kobject_uevent.c:593
__device_release_driver drivers/base/dd.c:1264 [inline]
device_release_driver_internal+0x5c9/0x700 drivers/base/dd.c:1275
driver_detach+0xd5/0x1a0 drivers/base/dd.c:1338
bus_remove_driver+0x104/0x300 drivers/base/bus.c:677
driver_unregister+0x73/0xb0 drivers/base/driver.c:274
Memory state around the buggy address:
ffff8880781af300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880781af380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880781af400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880781af480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880781af500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================