bisecting fixing commit since 7d80e1218adf6d1aa5270587192789e218fef706 building syzkaller on 6affd8e838ce8a0c7d72445a7f67fe3bde8bbe04 testing commit 7d80e1218adf6d1aa5270587192789e218fef706 with gcc (GCC) 8.1.0 kernel signature: 9f7d0e11d2c9a8fd6bcd6d9afa60d9dc265bab48e6cbecfb179e132e64a1fa14 all runs: crashed: KASAN: use-after-free Read in bpf_test_finish testing current HEAD b850307b279cbd12ab8c654d1a3dfe55319cc475 testing commit b850307b279cbd12ab8c654d1a3dfe55319cc475 with gcc (GCC) 8.1.0 kernel signature: 5677815b8e59e082cba0d413663746a873aa2ff584f7dcf6584ec69164f43665 all runs: crashed: KASAN: use-after-free Read in bpf_test_finish revisions tested: 2, total time: 24m6.023830676s (build: 15m29.319971377s, test: 7m54.394976012s) the crash still happens on HEAD commit msg: Linux 4.14.184 crash: KASAN: use-after-free Read in bpf_test_finish IPv6: ADDRCONF(NETDEV_CHANGE): bridge0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_team: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): team_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_bridge: link is not ready ================================================================== BUG: KASAN: use-after-free in _copy_to_user+0x84/0xb0 lib/usercopy.c:27 IPv6: ADDRCONF(NETDEV_UP): veth1_to_team: link is not ready Read of size 931 at addr ffff88807a3ffff3 by task syz-executor.2/7096 CPU: 1 PID: 7096 Comm: syz-executor.2 Not tainted 4.14.184-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 IPv6: ADDRCONF(NETDEV_UP): veth0_to_hsr: link is not ready print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 IPv6: ADDRCONF(NETDEV_UP): veth1_to_hsr: link is not ready 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 hsr0: Slave A (hsr_slave_0) is not up; please bring it up to get a fully working HSR network kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 _copy_to_user+0x84/0xb0 lib/usercopy.c:27 copy_to_user include/linux/uaccess.h:155 [inline] bpf_test_finish.isra.5+0xd5/0x170 net/bpf/test_run.c:59 hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network bpf_prog_test_run_skb+0x66d/0xbc0 net/bpf/test_run.c:144 IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready bpf_prog_test_run kernel/bpf/syscall.c:1264 [inline] SYSC_bpf kernel/bpf/syscall.c:1529 [inline] SyS_bpf+0x4d7/0x288a kernel/bpf/syscall.c:1477 8021q: adding VLAN 0 to HW filter on device batadv0 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x459829 RSP: 002b:00007fe60772bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459829 RDX: 0000000000000028 RSI: 0000000020000140 RDI: 000000000000000a RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe60772c6d4 R13: 00000000004bfb92 R14: 00000000004d1758 R15: 00000000ffffffff The buggy address belongs to the page: page:ffffea0001e8ffc0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x1fffc0000000000() raw: 01fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff raw: ffffea0001e8ffe0 ffffea0001e8ffe0 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88807a3ffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807a3fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88807a3fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807a400000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807a400080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_bridge: link becomes ready