bisecting fixing commit since 31acccdc877486a649a86d37725a15175fcd5ed6 building syzkaller on 09323409cdbe048449a5a6819c076492c166f18a testing commit 31acccdc877486a649a86d37725a15175fcd5ed6 with gcc (GCC) 8.1.0 kernel signature: 00f3f8e99977425cb59d79330356445df5fd5c97a3ebce054526e96e2a038b97 run #0: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #1: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #2: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #3: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #4: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #5: crashed: KASAN: use-after-free Read in ieee80211_key_free run #6: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #7: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #8: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #9: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free testing current HEAD 13d2ce42de8cb98ff952f8de6307f896203854c2 testing commit 13d2ce42de8cb98ff952f8de6307f896203854c2 with gcc (GCC) 8.1.0 kernel signature: ced0993968b5abb6705e78bd2bb6f4769a0b7d09eb1390daa33109dce2694561 run #0: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #1: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #2: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #3: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #4: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #5: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #6: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #7: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free run #8: crashed: KASAN: use-after-free Read in ieee80211_key_free run #9: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free revisions tested: 2, total time: 28m6.238110554s (build: 21m32.606508965s, test: 5m47.926474115s) the crash still happens on HEAD commit msg: Linux 4.19.163 crash: KASAN: slab-out-of-bounds Read in ieee80211_key_free IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes 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: slab-out-of-bounds in ieee80211_key_free+0xcf/0xe0 net/mac80211/key.c:722 Read of size 2 at addr ffff8881e60b04a8 by task syz-executor.0/9203 CPU: 0 PID: 9203 Comm: syz-executor.0 Not tainted 4.19.163-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+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:431 ieee80211_key_free+0xcf/0xe0 net/mac80211/key.c:722 ieee80211_del_key+0x124/0x300 net/mac80211/cfg.c:498 rdev_del_key net/wireless/rdev-ops.h:106 [inline] nl80211_del_key+0x363/0xa40 net/wireless/nl80211.c:3656 genl_family_rcv_msg+0x599/0x1000 net/netlink/genetlink.c:602 genl_rcv_msg+0xa7/0x140 net/netlink/genetlink.c:627 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2455 genl_rcv+0x23/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb461c9ac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002b1c0 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffeaa0babef R14: 00007fb461c9b9c0 R15: 000000000118bf2c Allocated by task 7842: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc_track_caller+0x159/0x3d0 mm/slab.c:3742 kstrdup+0x2c/0x60 mm/util.c:56 kstrdup_const+0x1f/0x30 mm/util.c:77 __kernfs_new_node+0xb0/0x6f0 fs/kernfs/dir.c:629 kernfs_new_node+0x62/0x110 fs/kernfs/dir.c:693 kernfs_create_link+0xb4/0x222 fs/kernfs/symlink.c:40 sysfs_do_create_link_sd.isra.0+0x7d/0xf0 fs/sysfs/symlink.c:43 sysfs_do_create_link fs/sysfs/symlink.c:79 [inline] sysfs_create_link+0x43/0xb0 fs/sysfs/symlink.c:91 device_add_class_symlinks drivers/base/core.c:1918 [inline] device_add+0x6a4/0x16b0 drivers/base/core.c:2120 device_create_groups_vargs+0x1c0/0x220 drivers/base/core.c:2772 device_create_vargs drivers/base/core.c:2812 [inline] device_create+0x8e/0xc0 drivers/base/core.c:2848 mac80211_hwsim_new_radio+0x32b/0x3750 drivers/net/wireless/mac80211_hwsim.c:2678 hwsim_new_radio_nl+0x517/0x8d0 drivers/net/wireless/mac80211_hwsim.c:3374 genl_family_rcv_msg+0x599/0x1000 net/netlink/genetlink.c:602 genl_rcv_msg+0xa7/0x140 net/netlink/genetlink.c:627 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2455 genl_rcv+0x23/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:632 __sys_sendto+0x1f2/0x2e0 net/socket.c:1787 __do_sys_sendto net/socket.c:1799 [inline] __se_sys_sendto net/socket.c:1795 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1795 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 rh_call_control drivers/usb/core/hcd.c:728 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:838 [inline] usb_hcd_submit_urb+0xa11/0x22f0 drivers/usb/core/hcd.c:1651 usb_submit_urb+0x8d2/0x13b0 drivers/usb/core/urb.c:571 usb_start_wait_urb+0x106/0x500 drivers/usb/core/message.c:57 usb_internal_control_msg drivers/usb/core/message.c:101 [inline] usb_control_msg+0x331/0x570 drivers/usb/core/message.c:152 set_port_feature+0x56/0x80 drivers/usb/core/hub.c:430 hub_power_on+0x14b/0x360 drivers/usb/core/hub.c:890 hub_activate+0xc52/0x1340 drivers/usb/core/hub.c:1049 hub_configure drivers/usb/core/hub.c:1649 [inline] hub_probe+0x1b0f/0x2c10 drivers/usb/core/hub.c:1849 usb_probe_interface+0x271/0x8e0 drivers/usb/core/driver.c:361 really_probe+0x477/0x960 drivers/base/dd.c:504 driver_probe_device+0x1ca/0x2f0 drivers/base/dd.c:665 __device_attach_driver+0x19b/0x250 drivers/base/dd.c:752 bus_for_each_drv+0x11d/0x1c0 drivers/base/bus.c:464 __device_attach+0x205/0x310 drivers/base/dd.c:820 device_initial_probe+0xe/0x10 drivers/base/dd.c:867 bus_probe_device+0x1a4/0x250 drivers/base/bus.c:524 device_add+0x997/0x16b0 drivers/base/core.c:2154 usb_set_configuration+0xcd2/0x16f0 drivers/usb/core/message.c:2016 generic_probe+0x78/0xb0 drivers/usb/core/generic.c:174 usb_probe_device+0x8f/0xf0 drivers/usb/core/driver.c:266 really_probe+0x477/0x960 drivers/base/dd.c:504 driver_probe_device+0x1ca/0x2f0 drivers/base/dd.c:665 __device_attach_driver+0x19b/0x250 drivers/base/dd.c:752 bus_for_each_drv+0x11d/0x1c0 drivers/base/bus.c:464 __device_attach+0x205/0x310 drivers/base/dd.c:820 device_initial_probe+0xe/0x10 drivers/base/dd.c:867 bus_probe_device+0x1a4/0x250 drivers/base/bus.c:524 device_add+0x997/0x16b0 drivers/base/core.c:2154 usb_new_device+0x964/0x1990 drivers/usb/core/hub.c:2519 register_root_hub drivers/usb/core/hcd.c:1105 [inline] usb_add_hcd+0xa15/0x1880 drivers/usb/core/hcd.c:2882 vhci_hcd_probe+0x115/0x310 drivers/usb/usbip/vhci_hcd.c:1355 platform_drv_probe+0xb0/0x150 drivers/base/platform.c:584 really_probe+0x477/0x960 drivers/base/dd.c:504 driver_probe_device+0x1ca/0x2f0 drivers/base/dd.c:665 __device_attach_driver+0x19b/0x250 drivers/base/dd.c:752 bus_for_each_drv+0x11d/0x1c0 drivers/base/bus.c:464 __device_attach+0x205/0x310 drivers/base/dd.c:820 device_initial_probe+0xe/0x10 drivers/base/dd.c:867 bus_probe_device+0x1a4/0x250 drivers/base/bus.c:524 device_add+0x997/0x16b0 drivers/base/core.c:2154 platform_device_add+0x2ae/0x6e0 drivers/base/platform.c:420 vhci_hcd_init+0x27f/0x385 drivers/usb/usbip/vhci_hcd.c:1539 do_one_initcall+0xbc/0x518 init/main.c:884 do_initcall_level init/main.c:952 [inline] do_initcalls init/main.c:960 [inline] do_basic_setup init/main.c:978 [inline] kernel_init_freeable+0x750/0x7f4 init/main.c:1145 kernel_init+0xc/0x113 init/main.c:1062 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8881e60b0480 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes to the right of 32-byte region [ffff8881e60b0480, ffff8881e60b04a0) The buggy address belongs to the page: page:ffffea0007982c00 count:1 mapcount:0 mapping:ffff8881f60001c0 index:0xffff8881e60b0fc1 flags: 0x17ff00000000100(slab) raw: 017ff00000000100 ffffea00079756c8 ffffea0007987148 ffff8881f60001c0 raw: ffff8881e60b0fc1 ffff8881e60b0000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e60b0380: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff8881e60b0400: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8881e60b0480: 07 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ^ ffff8881e60b0500: 07 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ffff8881e60b0580: 00 04 fc fc fc fc fc fc 00 04 fc fc fc fc fc fc ==================================================================