bisecting fixing commit since 312017a460d5ea31d646e7148e400e13db799ddc building syzkaller on 2a752b7c5e39457c3c16ef91cf2192a42813c802 testing commit 312017a460d5ea31d646e7148e400e13db799ddc with gcc (GCC) 8.1.0 kernel signature: 7bf87d0bdad81c2bb28a52736b5f1fecae3722f9 all runs: crashed: KASAN: use-after-free Write in __alloc_skb testing current HEAD cb1f9a169a0e197f93816ace48a6520e8640809d testing commit cb1f9a169a0e197f93816ace48a6520e8640809d with gcc (GCC) 8.1.0 kernel signature: 52a0c2c623469cda23d23d66404aa9472ecc619a all runs: crashed: KASAN: use-after-free Write in __alloc_skb revisions tested: 2, total time: 25m1.053570286s (build: 17m54.341168788s, test: 6m27.632830189s) the crash still happens on HEAD commit msg: Linux 4.19.94 crash: KASAN: use-after-free Write in __alloc_skb IPv6: ADDRCONF(NETDEV_UP): veth1_to_bond: link is not ready netlink: 2 bytes leftover after parsing attributes in process `syz-executor.2'. IPv6: ADDRCONF(NETDEV_UP): veth1_to_hsr: link is not ready ================================================================== hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network BUG: KASAN: use-after-free in memset include/linux/string.h:333 [inline] BUG: KASAN: use-after-free in __alloc_skb+0x34e/0x580 net/core/skbuff.c:234 Write of size 32 at addr ffff8881934f0a40 by task syz-executor.1/7192 CPU: 0 PID: 7192 Comm: syz-executor.1 Not tainted 4.19.94-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+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memset+0x23/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:333 [inline] __alloc_skb+0x34e/0x580 net/core/skbuff.c:234 IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready alloc_skb include/linux/skbuff.h:995 [inline] alloc_skb_with_frags+0x75/0x490 net/core/skbuff.c:5303 sock_alloc_send_pskb+0x574/0x750 net/core/sock.c:2085 sock_alloc_send_skb+0x13/0x20 net/core/sock.c:2102 IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready mld_newpack+0x1d1/0x8f0 net/ipv6/mcast.c:1611 add_grhead.isra.31+0x27b/0x380 net/ipv6/mcast.c:1715 add_grec+0xb46/0xdf0 net/ipv6/mcast.c:1846 IPv6: ADDRCONF(NETDEV_UP): vxcan0: link is not ready mld_send_cr net/ipv6/mcast.c:1972 [inline] mld_ifc_timer_expire+0x309/0x740 net/ipv6/mcast.c:2479 call_timer_fn+0x14c/0x510 kernel/time/timer.c:1326 IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready expire_timers kernel/time/timer.c:1363 [inline] __run_timers kernel/time/timer.c:1684 [inline] run_timer_softirq+0xb63/0x1180 kernel/time/timer.c:1697 8021q: adding VLAN 0 to HW filter on device batadv0 __do_softirq+0x260/0x92d kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:412 kobject: 'vlan0' (0000000026596f00): kobject_add_internal: parent: 'mesh', set: '' exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13e/0x540 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:rep_nop arch/x86/include/asm/processor.h:665 [inline] RIP: 0010:cpu_relax arch/x86/include/asm/processor.h:670 [inline] RIP: 0010:mutex_spin_on_owner+0x233/0x320 kernel/locking/mutex.c:552 Code: c3 be 08 00 00 00 4c 89 ef e8 19 2a 47 00 4c 89 e8 48 c1 e8 03 42 80 3c 30 00 0f 85 e8 00 00 00 49 8b 45 00 a8 01 75 93 f3 90 3a fe ff ff 0f 0b e8 21 56 07 00 84 c0 0f 85 13 fe ff ff 48 c7 RSP: 0018:ffff888092f6f6b8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000008 RDI: 0000000000000001 RBP: ffff888092f6f6f0 R08: fffffbfff11f15bd R09: fffffbfff11f15bc R10: fffffbfff11f15bc R11: ffffffff88f8ade7 R12: fffffbfff10a4108 R13: ffffffff88f8ade0 R14: dffffc0000000000 R15: ffff88807b742600 netlink: 2 bytes leftover after parsing attributes in process `syz-executor.5'. mutex_optimistic_spin kernel/locking/mutex.c:646 [inline] __mutex_lock_common kernel/locking/mutex.c:928 [inline] __mutex_lock+0x6e8/0x1210 kernel/locking/mutex.c:1072 kobject: 'bridge1' (00000000910902e9): kobject_add_internal: parent: 'net', set: 'devices' mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 rtnl_lock net/core/rtnetlink.c:77 [inline] rtnetlink_rcv_msg+0x301/0x8f0 net/core/rtnetlink.c:4765 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 kobject: 'bridge1' (00000000910902e9): kobject_uevent_env rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4786 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc40 net/netlink/af_netlink.c:1908 kobject: 'bridge1' (00000000910902e9): fill_kobj_path: path = '/devices/virtual/net/bridge1' sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 __sys_sendto+0x1f2/0x2e0 net/socket.c:1787 kobject: 'queues' (0000000081d4a1dd): kobject_add_internal: parent: 'bridge1', set: '' __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 kobject: 'queues' (0000000081d4a1dd): kobject_uevent_env RIP: 0033:0x414603 Code: ff 0f 83 b0 19 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 6d 3e 66 00 00 75 17 49 89 ca b8 2c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 81 19 00 00 c3 48 83 ec 08 e8 87 fa ff ff RSP: 002b:00007ffef4cbe8f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000a72200 RCX: 0000000000414603 RDX: 000000000000002c RSI: 0000000000a72250 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffef4cbe900 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000a72250 R15: 0000000000000003 The buggy address belongs to the page: page:ffffea00064d3c00 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x57ffe0000000000() raw: 057ffe0000000000 ffffea00064d3c08 ffffea00064d3c08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881934f0900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881934f0980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff kobject: 'queues' (0000000081d4a1dd): kobject_uevent_env: filter function caused the event to drop! >ffff8881934f0a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881934f0a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881934f0b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================