IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:372 [inline] BUG: KASAN: use-after-free in ieee80211_ibss_build_presp+0xf55/0x14b0 net/mac80211/ibss.c:173 Read of size 135 at addr ffff8880a9968800 by task kworker/u4:1/22 CPU: 1 PID: 22 Comm: kworker/u4:1 Not tainted 4.14.202-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: phy2 ieee80211_iface_work Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report+0x6f/0x7b mm/kasan/report.c:409 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:372 [inline] ieee80211_ibss_build_presp+0xf55/0x14b0 net/mac80211/ibss.c:173 __ieee80211_sta_join_ibss+0x5d1/0x1c80 net/mac80211/ibss.c:319 ieee80211_sta_create_ibss.cold+0xbb/0xf1 net/mac80211/ibss.c:1346 ieee80211_sta_find_ibss net/mac80211/ibss.c:1476 [inline] ieee80211_ibss_work.cold+0x266/0x565 net/mac80211/ibss.c:1700 ieee80211_iface_work+0x690/0x770 net/mac80211/iface.c:1383 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 8322: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc_track_caller+0x155/0x400 mm/slab.c:3735 kmemdup+0x23/0x50 mm/util.c:118 kmemdup include/linux/string.h:445 [inline] ieee80211_ibss_join+0x761/0xd70 net/mac80211/ibss.c:1812 rdev_join_ibss net/wireless/rdev-ops.h:521 [inline] __cfg80211_join_ibss+0x5bc/0xd90 net/wireless/ibss.c:132 cfg80211_join_ibss+0x70/0x90 net/wireless/ibss.c:155 nl80211_join_ibss+0xb4f/0xf00 net/wireless/nl80211.c:8623 genl_family_rcv_msg+0x572/0xb20 net/netlink/genetlink.c:600 genl_rcv_msg+0xaf/0x140 net/netlink/genetlink.c:625 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 genl_rcv+0x24/0x40 net/netlink/genetlink.c:636 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 8323: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 ieee80211_ibss_leave+0x83/0xd8 net/mac80211/ibss.c:1863 rdev_leave_ibss net/wireless/rdev-ops.h:531 [inline] __cfg80211_leave_ibss+0x14c/0x6d0 net/wireless/ibss.c:217 __cfg80211_leave+0x2e4/0x3b0 net/wireless/core.c:1055 cfg80211_leave net/wireless/core.c:1106 [inline] cfg80211_netdev_notifier_call+0xbfe/0x1b50 net/wireless/core.c:1205 notifier_call_chain+0x108/0x1a0 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1667 [inline] call_netdevice_notifiers net/core/dev.c:1683 [inline] __dev_close_many+0xe3/0x270 net/core/dev.c:1424 __dev_close net/core/dev.c:1462 [inline] __dev_change_flags+0x21f/0x540 net/core/dev.c:6792 dev_change_flags+0x7e/0x130 net/core/dev.c:6860 dev_ifsioc+0x23c/0x7d0 net/core/dev_ioctl.c:257 dev_ioctl+0x222/0xbe0 net/core/dev_ioctl.c:566 sock_do_ioctl net/socket.c:981 [inline] sock_ioctl+0x164/0x4c0 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880a9968800 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of 192-byte region [ffff8880a9968800, ffff8880a99688c0) The buggy address belongs to the page: page:ffffea0002a65a00 count:1 mapcount:0 mapping:ffff8880a9968000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a9968000 0000000000000000 0000000100000010 raw: ffffea0002a639e0 ffffea0002a69de0 ffff88813fe80040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9968700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a9968780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880a9968800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a9968880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a9968900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================