==================================================================
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 ffff8881370c3450 by task udevd/10784
CPU: 0 PID: 10784 Comm: udevd 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:iput+0x0/0x70 fs/inode.c:1757
Code: ff 4c 89 ff e8 91 09 f3 ff e9 4b fc ff ff 4c 89 ff e8 04 09 f3 ff e9 7d fc ff ff 4c 89 ff e8 77 09 f3 ff e9 bd fc ff ff 66 90 <55> 48 89 fd 53 e8 76 27 bf ff 48 85 ed 74 49 e8 6c 27 bf ff 48 8d
RSP: 0018:ffffc9000e21fd58 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888116edd580 RSI: ffffffff81857bc9 RDI: ffff88813c45d850
RBP: ffff8881213591a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88813c45d850
R13: 0000000000000400 R14: 0000000000000000 R15: 0000000000000004
dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401
d_delete fs/dcache.c:2532 [inline]
d_delete+0x16b/0x1c0 fs/dcache.c:2521
d_delete_notify include/linux/fsnotify.h:259 [inline]
vfs_unlink+0x561/0x920 fs/namei.c:4244
do_unlinkat+0x3cc/0x650 fs/namei.c:4297
__do_sys_unlink fs/namei.c:4345 [inline]
__se_sys_unlink fs/namei.c:4343 [inline]
__x64_sys_unlink+0xc6/0x110 fs/namei.c:4343
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:0x7f866fe132d7
Code: f0 ff ff 73 01 c3 48 8b 0d 9e db 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 71 db 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffdfa8b4288 EFLAGS: 00000202 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000564ec823b120 RCX: 00007f866fe132d7
RDX: 0000000000000000 RSI: 0000564ec98345ac RDI: 00007ffdfa8b4298
RBP: 00007ffdfa8b4298 R08: 0000000000000000 R09: 0000564ec981d720
R10: 00007f866fee1a00 R11: 0000000000000202 R12: 0000564ec983b190
R13: 000000000aba9500 R14: 0000000003938700 R15: 0000564ec823b160
Allocated by task 0:
(stack is not available)
The buggy address belongs to the object at ffff8881370c3400
which belongs to the cache kmalloc-cg-512 of size 512
The buggy address is located 80 bytes inside of
512-byte region [ffff8881370c3400, ffff8881370c3600)
The buggy address belongs to the physical page:
page:ffffea0004dc3000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1370c0
head:ffffea0004dc3000 order:2 compound_mapcount:0 compound_pincount:0
memcg:ffff888133b5a701
flags: 0x200000000010200(slab|head|node=0|zone=2)
raw: 0200000000010200 0000000000000000 dead000000000122 ffff888100042dc0
raw: 0000000000000000 0000000080100010 00000001ffffffff ffff888133b5a701
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 10784, tgid 10784 (udevd), ts 3469566814662, free_ts 3469541510680
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:
ffff8881370c3300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881370c3380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881370c3400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8881370c3480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881370c3500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: ff 4c 89 ff decl -0x1(%rcx,%rcx,4)
4: e8 91 09 f3 ff callq 0xfff3099a
9: e9 4b fc ff ff jmpq 0xfffffc59
e: 4c 89 ff mov %r15,%rdi
11: e8 04 09 f3 ff callq 0xfff3091a
16: e9 7d fc ff ff jmpq 0xfffffc98
1b: 4c 89 ff mov %r15,%rdi
1e: e8 77 09 f3 ff callq 0xfff3099a
23: e9 bd fc ff ff jmpq 0xfffffce5
28: 66 90 xchg %ax,%ax
* 2a: 55 push %rbp <-- trapping instruction
2b: 48 89 fd mov %rdi,%rbp
2e: 53 push %rbx
2f: e8 76 27 bf ff callq 0xffbf27aa
34: 48 85 ed test %rbp,%rbp
37: 74 49 je 0x82
39: e8 6c 27 bf ff callq 0xffbf27aa
3e: 48 rex.W
3f: 8d .byte 0x8d