bisecting fixing commit since addba38e7c3bc19036a05c83bcce7878dc644d87 building syzkaller on 3fd2ea69e05557e7e0fef9b68263b4150670671c testing commit addba38e7c3bc19036a05c83bcce7878dc644d87 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 37c466fa0421b3d9382f011ba153aa878e0aa40ad4d0ae1eca0eebc2324f72f0 run #0: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #1: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #2: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #3: crashed: KASAN: use-after-free Write in skcipher_null_crypt run #4: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #5: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #6: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #7: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #8: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #9: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #10: crashed: KASAN: use-after-free Write in skcipher_null_crypt run #11: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #12: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #13: crashed: KASAN: use-after-free Write in skcipher_null_crypt run #14: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #15: crashed: KASAN: use-after-free Write in skcipher_null_crypt run #16: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #17: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #18: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #19: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt testing current HEAD e34184f53363f6bb873c2fe0ce1a08ed7d16e94a testing commit e34184f53363f6bb873c2fe0ce1a08ed7d16e94a compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 5551de6280f89b0bec9c27c25134855fd3c296d9d4086c6e9c8f652cf3273fae run #0: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #1: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #2: crashed: KASAN: use-after-free Write in skcipher_null_crypt run #3: crashed: KASAN: use-after-free Write in skcipher_null_crypt run #4: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #5: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #6: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #7: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt run #8: crashed: KASAN: stack-out-of-bounds Write in skcipher_null_crypt run #9: crashed: KASAN: slab-out-of-bounds Write in skcipher_null_crypt revisions tested: 2, total time: 23m26.375939731s (build: 16m33.022429062s, test: 6m27.600003709s) the crash still happens on HEAD commit msg: Linux 4.19.210 crash: KASAN: slab-out-of-bounds Write in skcipher_null_crypt IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready wlan1: Created IBSS using preconfigured 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 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in skcipher_null_crypt+0x97/0xf0 crypto/crypto_null.c:89 Write of size 4096 at addr ffff88809d3e0000 by task syz-executor.0/9838 CPU: 1 PID: 9838 Comm: syz-executor.0 Not tainted 4.19.210-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 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready 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 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13c/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:377 [inline] skcipher_null_crypt+0x97/0xf0 crypto/crypto_null.c:89 skcipher_crypt_blkcipher crypto/skcipher.c:639 [inline] skcipher_encrypt_blkcipher+0x1bc/0x280 crypto/skcipher.c:648 crypto_skcipher_encrypt include/crypto/skcipher.h:445 [inline] crypto_authenc_encrypt+0x6db/0xb90 crypto/authenc.c:237 crypto_aead_encrypt include/crypto/aead.h:337 [inline] esp6_output_tail+0x7b7/0x19d0 net/ipv6/esp6.c:406 esp6_output+0x458/0xde0 net/ipv6/esp6.c:476 xfrm_output_one net/xfrm/xfrm_output.c:115 [inline] xfrm_output_resume+0x5fe/0x2060 net/xfrm/xfrm_output.c:150 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 xfrm_output2 net/xfrm/xfrm_output.c:177 [inline] xfrm_output+0x203/0x860 net/xfrm/xfrm_output.c:262 xfrm6_output_finish+0x57/0x70 net/ipv6/xfrm6_output.c:135 __xfrm6_output+0x13a/0xe00 net/ipv6/xfrm6_output.c:184 NF_HOOK_COND include/linux/netfilter.h:278 [inline] xfrm6_output+0xe7/0x400 net/ipv6/xfrm6_output.c:189 dst_output include/net/dst.h:455 [inline] ip6_local_out+0x74/0x110 net/ipv6/output_core.c:160 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready ip6_send_skb+0x92/0x2a0 net/ipv6/ip6_output.c:1741 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready ip6_push_pending_frames+0x94/0xb0 net/ipv6/ip6_output.c:1761 rawv6_push_pending_frames net/ipv6/raw.c:618 [inline] rawv6_sendmsg+0x23cb/0x32f0 net/ipv6/raw.c:959 wlan1: Created IBSS using preconfigured 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 inet_sendmsg+0x108/0x440 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 ___sys_sendmsg+0x647/0x950 net/socket.c:2227 __sys_sendmsg+0xd9/0x180 net/socket.c:2265 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2272 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665e9 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:00007fb5a7fb0188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e ieee80211 phy11: Selected rate control algorithm 'minstrel_ht' RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000000 RSI: 0000000020000500 RDI: 0000000000000004 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffdf78e617f R14: 00007fb5a7fb0300 R15: 0000000000022000 Allocated by task 25: 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 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.9+0x2c/0xc0 net/core/skbuff.c:137 __alloc_skb+0xd7/0x580 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] nlmsg_new include/net/netlink.h:511 [inline] rtmsg_ifinfo_build_skb+0x6f/0x170 net/core/rtnetlink.c:3353 rtmsg_ifinfo_event.part.14+0x1a/0xb0 net/core/rtnetlink.c:3389 rtmsg_ifinfo_event net/core/rtnetlink.c:3400 [inline] rtmsg_ifinfo+0x4e/0x70 net/core/rtnetlink.c:3398 netdev_state_change net/core/dev.c:1351 [inline] netdev_state_change+0xe8/0x100 net/core/dev.c:1342 linkwatch_do_dev+0x72/0xc0 net/core/link_watch.c:164 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready __linkwatch_run_queue+0x24b/0x470 net/core/link_watch.c:202 linkwatch_event+0x3e/0x50 net/core/link_watch.c:237 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready Freed by task 25: 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 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 skb_free_head+0x74/0x90 net/core/skbuff.c:563 pskb_expand_head+0x27c/0xd80 net/core/skbuff.c:1506 netlink_trim+0x1a7/0x200 net/netlink/af_netlink.c:1302 netlink_broadcast_filtered+0x57/0x900 net/netlink/af_netlink.c:1499 netlink_broadcast+0xe/0x10 net/netlink/af_netlink.c:1544 nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x10c/0x140 net/netlink/af_netlink.c:2500 rtnl_notify net/core/rtnetlink.c:736 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3377 [inline] rtmsg_ifinfo_event.part.14+0x7f/0xb0 net/core/rtnetlink.c:3392 rtmsg_ifinfo_event net/core/rtnetlink.c:3400 [inline] rtmsg_ifinfo+0x4e/0x70 net/core/rtnetlink.c:3398 netdev_state_change net/core/dev.c:1351 [inline] netdev_state_change+0xe8/0x100 net/core/dev.c:1342 linkwatch_do_dev+0x72/0xc0 net/core/link_watch.c:164 __linkwatch_run_queue+0x24b/0x470 net/core/link_watch.c:202 linkwatch_event+0x3e/0x50 net/core/link_watch.c:237 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 The buggy address belongs to the object at ffff88809d3e01c0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 448 bytes to the left of 4096-byte region [ffff88809d3e01c0, ffff88809d3e11c0) IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready The buggy address belongs to the page: ieee80211 phy12: Selected rate control algorithm 'minstrel_ht' page:ffffea000274f800 count:1 mapcount:0 mapping:ffff88813bff6dc0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea000272f508 ffffea000274a788 ffff88813bff6dc0 raw: 0000000000000000 ffff88809d3e01c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809d3dff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809d3dff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809d3e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809d3e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809d3e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================