bisecting fixing commit since 811218eceeaa7618652e1b8d11caeff67ab42072 building syzkaller on a5f86b15f4f60350198e4b98fb7451d45d38a186 testing commit 811218eceeaa7618652e1b8d11caeff67ab42072 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 46132fef3a4033f79d503522aaf67d99f793d19e81c7c297f17c02de60100f20 run #0: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #1: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #2: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #3: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #4: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #5: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #6: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #7: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #8: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #9: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #10: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #11: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #12: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #13: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #14: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #15: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #16: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #17: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #18: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #19: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data testing current HEAD 6ca2f514c57864e3085a65c5e9d2adca4144bc4c testing commit 6ca2f514c57864e3085a65c5e9d2adca4144bc4c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 96dd0763cee0debea02ee4fc9de91684f72e6eba6f712c5e5771b22d7d3a67b7 run #0: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #1: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #2: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #3: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #4: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #5: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #6: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #7: crashed: KASAN: use-after-free Write in ext4_write_inline_data run #8: crashed: KASAN: slab-out-of-bounds Write in ext4_write_inline_data run #9: crashed: KASAN: use-after-free Write in ext4_write_inline_data revisions tested: 2, total time: 27m8.492365482s (build: 19m49.47154119s, test: 6m45.873879417s) the crash still happens on HEAD commit msg: Linux 4.19.201 crash: KASAN: use-after-free Write in ext4_write_inline_data batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:377 [inline] BUG: KASAN: use-after-free in ext4_write_inline_data.isra.4+0x27a/0x480 fs/ext4/inline.c:245 Write of size 70 at addr ffff88809aa0f4ef by task syz-executor.3/9799 CPU: 1 PID: 9799 Comm: syz-executor.3 Not tainted 4.19.201-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 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] ext4_write_inline_data.isra.4+0x27a/0x480 fs/ext4/inline.c:245 ext4_write_inline_data_end+0x1df/0x530 fs/ext4/inline.c:754 ext4_write_end+0x167/0xb10 fs/ext4/inode.c:1423 ext4_da_write_end+0x622/0x9b0 fs/ext4/inode.c:3170 generic_perform_write+0x2e3/0x480 mm/filemap.c:3181 __generic_file_write_iter+0x205/0x590 mm/filemap.c:3295 ext4_file_write_iter+0x281/0xe50 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x443/0x890 fs/read_write.c:487 vfs_write+0x150/0x4d0 fs/read_write.c:549 ksys_write+0x103/0x260 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:608 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465b09 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:00007f5f0d482188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465b09 RDX: 0000000000000082 RSI: 0000000020000180 RDI: 0000000000000003 RBP: 00000000004b069f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffe3fccb2af R14: 00007f5f0d482300 R15: 0000000000022000 Allocated by task 8462: 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 kmem_cache_alloc_trace+0x152/0x3a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] kobject_uevent_env+0x1c7/0x1130 lib/kobject_uevent.c:522 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:640 device_add+0x98f/0x16b0 drivers/base/core.c:2168 netdev_register_kobject+0x16e/0x3d0 net/core/net-sysfs.c:1806 register_netdevice+0x714/0xfa0 net/core/dev.c:8730 ieee80211_if_add+0x87a/0x1600 net/mac80211/iface.c:1889 ieee80211_register_hw+0x2954/0x3fc0 net/mac80211/main.c:1174 mac80211_hwsim_new_radio+0x1a57/0x3750 drivers/net/wireless/mac80211_hwsim.c:2896 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:2457 genl_rcv+0x23/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x667/0xc60 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 __sys_sendto+0x1f2/0x2e0 net/socket.c:1897 __do_sys_sendto net/socket.c:1909 [inline] __se_sys_sendto net/socket.c:1905 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1905 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8462: 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 kobject_uevent_env+0x221/0x1130 lib/kobject_uevent.c:624 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:640 device_add+0x98f/0x16b0 drivers/base/core.c:2168 netdev_register_kobject+0x16e/0x3d0 net/core/net-sysfs.c:1806 register_netdevice+0x714/0xfa0 net/core/dev.c:8730 ieee80211_if_add+0x87a/0x1600 net/mac80211/iface.c:1889 ieee80211_register_hw+0x2954/0x3fc0 net/mac80211/main.c:1174 mac80211_hwsim_new_radio+0x1a57/0x3750 drivers/net/wireless/mac80211_hwsim.c:2896 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:2457 genl_rcv+0x23/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x667/0xc60 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 __sys_sendto+0x1f2/0x2e0 net/socket.c:1897 __do_sys_sendto net/socket.c:1909 [inline] __se_sys_sendto net/socket.c:1905 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1905 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809aa0eb00 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2543 bytes inside of 4096-byte region [ffff88809aa0eb00, ffff88809aa0fb00) The buggy address belongs to the page: page:ffffea00026a8380 count:1 mapcount:0 mapping:ffff88813bff6dc0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea00026a7f88 ffffea000274e908 ffff88813bff6dc0 raw: 0000000000000000 ffff88809aa0eb00 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809aa0f380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809aa0f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809aa0f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809aa0f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809aa0f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================