================================================================== BUG: KASAN: use-after-free in htc_process_conn_rsp drivers/net/wireless/ath/ath9k/htc_hst.c:131 [inline] BUG: KASAN: use-after-free in ath9k_htc_rx_msg+0xa25/0xaf0 drivers/net/wireless/ath/ath9k/htc_hst.c:443 Write of size 2 at addr ffff8881d8dc5460 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.6.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xef/0x16e lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x314 mm/kasan/report.c:374 __kasan_report.cold+0x37/0x77 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 htc_process_conn_rsp drivers/net/wireless/ath/ath9k/htc_hst.c:131 [inline] ath9k_htc_rx_msg+0xa25/0xaf0 drivers/net/wireless/ath/ath9k/htc_hst.c:443 ath9k_hif_usb_reg_in_cb+0x1ba/0x630 drivers/net/wireless/ath/ath9k/hif_usb.c:718 __usb_hcd_giveback_urb+0x1f2/0x470 drivers/usb/core/hcd.c:1648 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1713 dummy_timer+0x1258/0x32ae drivers/usb/gadget/udc/dummy_hcd.c:1966 call_timer_fn+0x195/0x6f0 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5f9/0x1500 kernel/time/timer.c:1786 __do_softirq+0x21e/0x950 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x141/0x540 arch/x86/kernel/apic/apic.c:1146 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:default_idle+0x28/0x300 arch/x86/kernel/process.c:696 Code: cc cc 41 56 41 55 65 44 8b 2d 44 eb 71 7a 41 54 55 53 0f 1f 44 00 00 e8 f6 d7 b4 fb e9 07 00 00 00 0f 00 2d aa 7c 52 00 fb f4 <65> 44 8b 2d 20 eb 71 7a 0f 1f 44 00 00 5b 5d 41 5c 41 5d 41 5e c3 RSP: 0018:ffffffff87007da0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: ffffffff8702c740 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffffffff8702cf8c RBP: fffffbfff0e058e8 R08: ffffffff8702c740 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffffffff87e629c0 R15: 0000000000000000 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3e0/0x500 kernel/sched/idle.c:269 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:361 start_kernel+0x8a5/0x8df init/main.c:998 secondary_startup_64+0xb6/0xc0 arch/x86/kernel/head_64.S:242 Allocated by task 364: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:488 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2786 [inline] __kmalloc_node_track_caller+0xfc/0x3b0 mm/slub.c:4403 __kmalloc_reserve.isra.0+0x39/0xe0 net/core/skbuff.c:142 pskb_expand_head+0x148/0x1020 net/core/skbuff.c:1627 netlink_trim+0x1ea/0x240 net/netlink/af_netlink.c:1285 netlink_broadcast_filtered+0x5f/0xd40 net/netlink/af_netlink.c:1490 netlink_broadcast net/netlink/af_netlink.c:1535 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0x90/0x250 net/netlink/af_netlink.c:2521 rtnl_notify net/core/rtnetlink.c:737 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3705 [inline] rtmsg_ifinfo_event.part.0+0xb6/0xe0 net/core/rtnetlink.c:3720 rtmsg_ifinfo_event net/core/rtnetlink.c:3728 [inline] rtmsg_ifinfo+0x7f/0xa0 net/core/rtnetlink.c:3726 __dev_notify_flags+0x235/0x2c0 net/core/dev.c:8177 dev_change_flags+0x100/0x160 net/core/dev.c:8219 do_setlink+0xa1c/0x35f0 net/core/rtnetlink.c:2596 __rtnl_newlink+0xad5/0x1590 net/core/rtnetlink.c:3252 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x42b/0xae0 net/core/rtnetlink.c:5436 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 __sys_sendto+0x21a/0x330 net/socket.c:2000 __do_sys_sendto net/socket.c:2012 [inline] __se_sys_sendto net/socket.c:2008 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2008 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 364: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x117/0x160 mm/kasan/common.c:476 slab_free_hook mm/slub.c:1444 [inline] slab_free_freelist_hook mm/slub.c:1477 [inline] slab_free mm/slub.c:3034 [inline] kfree+0xd5/0x300 mm/slub.c:3995 skb_free_head+0x8b/0xa0 net/core/skbuff.c:590 skb_release_data+0x41f/0x7c0 net/core/skbuff.c:610 skb_release_all+0x46/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xf3/0x3c0 net/core/skbuff.c:831 netlink_broadcast_filtered+0x34f/0xd40 net/netlink/af_netlink.c:1513 netlink_broadcast net/netlink/af_netlink.c:1535 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0x90/0x250 net/netlink/af_netlink.c:2521 rtnl_notify net/core/rtnetlink.c:737 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3705 [inline] rtmsg_ifinfo_event.part.0+0xb6/0xe0 net/core/rtnetlink.c:3720 rtmsg_ifinfo_event net/core/rtnetlink.c:3728 [inline] rtmsg_ifinfo+0x7f/0xa0 net/core/rtnetlink.c:3726 __dev_notify_flags+0x235/0x2c0 net/core/dev.c:8177 dev_change_flags+0x100/0x160 net/core/dev.c:8219 do_setlink+0xa1c/0x35f0 net/core/rtnetlink.c:2596 __rtnl_newlink+0xad5/0x1590 net/core/rtnetlink.c:3252 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x42b/0xae0 net/core/rtnetlink.c:5436 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 __sys_sendto+0x21a/0x330 net/socket.c:2000 __do_sys_sendto net/socket.c:2012 [inline] __se_sys_sendto net/socket.c:2008 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2008 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881d8dc5000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1120 bytes inside of 2048-byte region [ffff8881d8dc5000, ffff8881d8dc5800) The buggy address belongs to the page: page:ffffea0007637000 refcount:1 mapcount:0 mapping:ffff8881da00c000 index:0x0 compound_mapcount: 0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 dead000000000100 dead000000000122 ffff8881da00c000 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d8dc5300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d8dc5380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881d8dc5400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881d8dc5480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d8dc5500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================