bisecting fixing commit since a844dc4c544291470aa69edbe2434b040794e269 building syzkaller on 2a752b7c5e39457c3c16ef91cf2192a42813c802 testing commit a844dc4c544291470aa69edbe2434b040794e269 with gcc (GCC) 8.1.0 kernel signature: 229cfae830bd9104f9217502b8ab5d4445cc4d58 all runs: crashed: KASAN: use-after-free Write in __alloc_skb testing current HEAD 6d0c334a400db31751c787c411e7187ab59a3f1d testing commit 6d0c334a400db31751c787c411e7187ab59a3f1d with gcc (GCC) 8.1.0 kernel signature: 69ba1e3a93c520480abe291d6c1687b602ecfa79 all runs: crashed: KASAN: use-after-free Write in __alloc_skb revisions tested: 2, total time: 24m1.37790443s (build: 16m59.291279073s, test: 6m25.275644917s) the crash still happens on HEAD commit msg: Linux 4.14.164 crash: KASAN: use-after-free Write in __alloc_skb bridge0: port 1(bridge_slave_0) entered disabled state device bridge_slave_0 entered promiscuous mode netlink: 2 bytes leftover after parsing attributes in process `syz-executor.1'. IPv6: ADDRCONF(NETDEV_UP): team_slave_0: link is not ready ================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:332 [inline] BUG: KASAN: use-after-free in __alloc_skb+0x308/0x500 net/core/skbuff.c:234 Write of size 36 at addr ffff88819acbd000 by task syz-executor.5/6940 CPU: 0 PID: 6940 Comm: syz-executor.5 Not tainted 4.14.164-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 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:332 [inline] __alloc_skb+0x308/0x500 net/core/skbuff.c:234 alloc_skb include/linux/skbuff.h:980 [inline] alloc_skb_with_frags+0x75/0x490 net/core/skbuff.c:5228 sock_alloc_send_pskb+0x53a/0x710 net/core/sock.c:2078 sock_alloc_send_skb+0x13/0x20 net/core/sock.c:2095 mld_newpack+0x1c5/0x8d0 net/ipv6/mcast.c:1585 add_grhead.isra.26+0x27b/0x380 net/ipv6/mcast.c:1691 add_grec+0xb1e/0xdc0 net/ipv6/mcast.c:1822 mld_send_cr net/ipv6/mcast.c:1948 [inline] mld_ifc_timer_expire+0x2f7/0x720 net/ipv6/mcast.c:2455 call_timer_fn+0x142/0x570 kernel/time/timer.c:1279 expire_timers kernel/time/timer.c:1318 [inline] __run_timers kernel/time/timer.c:1636 [inline] run_timer_softirq+0xc99/0x1210 kernel/time/timer.c:1649 __do_softirq+0x246/0x9b0 kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x15f/0x1a0 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x149/0x5d0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x96/0xa0 arch/x86/entry/entry_64.S:792 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:console_unlock+0x90d/0xe30 kernel/printk/printk.c:2405 RSP: 0018:ffff8880820ced30 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff10 RAX: 1ffffffff0fe2d31 RBX: 0000000000000200 RCX: 1ffff11010553586 RDX: 0000000000000000 RSI: ffff888082a9ac10 RDI: 0000000000000282 RBP: ffff8880820ceda8 R08: ffff888082a9ac30 R09: 0000000000000000 R10: 0000000000000000 R11: dffffc0000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffffffff8859e740 R15: ffffffff8859e710 vprintk_emit+0x1b4/0x4e0 kernel/printk/printk.c:1923 vprintk_default+0x1a/0x20 kernel/printk/printk.c:1963 vprintk_func+0x49/0x12c kernel/printk/printk_safe.c:401 printk+0x91/0xab kernel/printk/printk.c:1996 addrconf_notify+0x174/0x1b10 net/ipv6/addrconf.c:3411 notifier_call_chain+0xd6/0x150 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:401 call_netdevice_notifiers_info+0x4b/0x60 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] dev_open+0xd9/0xf0 net/core/dev.c:1411 team_port_add drivers/net/team/team.c:1210 [inline] team_add_slave+0x982/0x1890 drivers/net/team/team.c:1964 do_set_master+0x163/0x1f0 net/core/rtnetlink.c:1961 do_setlink+0x9dd/0x2c50 net/core/rtnetlink.c:2098 rtnl_newlink+0xe0c/0x1390 net/core/rtnetlink.c:2651 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4306 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4318 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x40b/0x600 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 SYSC_sendto+0x1e3/0x2c0 net/socket.c:1763 SyS_sendto+0x9/0x10 net/socket.c:1731 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x414603 RSP: 002b:00007fff42865318 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000a72200 RCX: 0000000000414603 RDX: 0000000000000028 RSI: 0000000000a72250 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007fff42865320 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000a72250 R15: 0000000000000003 The buggy address belongs to the page: page:ffffea00066b2f40 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x57ffe0000000000() raw: 057ffe0000000000 0000000000000000 0000000000000000 00000000ffffffff raw: ffffea00066b2f60 ffffea00066b2f60 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88819acbcf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88819acbcf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88819acbd000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88819acbd080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88819acbd100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================