bisecting fixing commit since 31acccdc877486a649a86d37725a15175fcd5ed6 building syzkaller on 09323409cdbe048449a5a6819c076492c166f18a testing commit 31acccdc877486a649a86d37725a15175fcd5ed6 with gcc (GCC) 8.4.1 20210217 kernel signature: be8802b8dde73b6ac9edca5b56d131e8aef7b0ca4554feddc32afb02dd227c9a all runs: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free testing current HEAD 255b58a2b3af0baa0ee11507390349217b8b73b0 testing commit 255b58a2b3af0baa0ee11507390349217b8b73b0 with gcc (GCC) 8.4.1 20210217 kernel signature: cdcf045c48e90d6ffd890eb08b99ff4b83c8d98e2471febf78495d707095159e run #0: crashed: KASAN: use-after-free 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: slab-out-of-bounds Read in ieee80211_key_free run #9: crashed: KASAN: slab-out-of-bounds Read in ieee80211_key_free revisions tested: 2, total time: 21m45.344783401s (build: 15m2.387896371s, test: 5m46.661836168s) the crash still happens on HEAD commit msg: Linux 4.19.176 crash: KASAN: slab-out-of-bounds Read in ieee80211_key_free wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ================================================================== BUG: KASAN: slab-out-of-bounds in ieee80211_key_free+0xcf/0xe0 net/mac80211/key.c:722 Read of size 2 at addr ffff8881da090928 by task syz-executor.3/9252 CPU: 1 PID: 9252 Comm: syz-executor.3 Not tainted 4.19.176-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/0x226 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 mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 __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+0x362/0xa20 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+0x667/0xc60 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:0x465889 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0a38db4188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000055bf00 RCX: 0000000000465889 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 00000000004af68d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bf00 R13: 00007ffc55faf3df R14: 00007f0a38db4300 R15: 0000000000022000 Allocated by task 1: 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_file+0x35/0x2e0 fs/kernfs/file.c:992 cgroup_add_file kernel/cgroup/cgroup.c:3578 [inline] cgroup_addrm_files+0x318/0x8b0 kernel/cgroup/cgroup.c:3637 css_populate_dir+0x2b2/0x3f0 kernel/cgroup/cgroup.c:1623 cgroup_mkdir+0x9e4/0xe70 kernel/cgroup/cgroup.c:5048 kernfs_iop_mkdir+0x13a/0x1c0 fs/kernfs/dir.c:1120 vfs_mkdir+0x37f/0x620 fs/namei.c:3819 do_mkdirat+0x1c2/0x220 fs/namei.c:3842 __do_sys_mkdir fs/namei.c:3858 [inline] __se_sys_mkdir fs/namei.c:3856 [inline] __x64_sys_mkdir+0x57/0x80 fs/namei.c:3856 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 5944: 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 single_release+0x8b/0xc0 fs/seq_file.c:597 close_pdeo.part.0+0xd8/0x2e0 fs/proc/inode.c:176 close_pdeo+0xf6/0x150 fs/proc/inode.c:168 proc_reg_release+0xff/0x170 fs/proc/inode.c:395 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881da090900 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes to the right of 32-byte region [ffff8881da090900, ffff8881da090920) The buggy address belongs to the page: page:ffffea0007682400 count:1 mapcount:0 mapping:ffff8881f60001c0 index:0xffff8881da090fc1 flags: 0x17ff00000000100(slab) raw: 017ff00000000100 ffffea0007712fc8 ffffea00076084c8 ffff8881f60001c0 raw: ffff8881da090fc1 ffff8881da090000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881da090800: fb fb fb fb fc fc fc fc 06 fc fc fc fc fc fc fc ffff8881da090880: 00 00 02 fc fc fc fc fc 00 02 fc fc fc fc fc fc >ffff8881da090900: 00 00 06 fc fc fc fc fc 00 05 fc fc fc fc fc fc ^ ffff8881da090980: 00 02 fc fc fc fc fc fc 00 00 07 fc fc fc fc fc ffff8881da090a00: 00 07 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ==================================================================