bisecting cause commit starting from b07f636fca1c8fbba124b0082487c0b3890a0e0c building syzkaller on ddc3e85997efdad885e208db6a98bca86e5dd52f testing commit b07f636fca1c8fbba124b0082487c0b3890a0e0c with gcc (GCC) 8.1.0 kernel signature: bf55ec5c0508cef5a0486ef05065b9e974476f71 all runs: crashed: KASAN: use-after-free Read in bitmap_port_ext_cleanup testing release v5.4 testing commit 219d54332a09e8d8741c1e1982f5eae56099de85 with gcc (GCC) 8.1.0 kernel signature: 70849f083ddec3b7c09459efde2b99b4e1469895 all runs: crashed: KASAN: use-after-free Read in bitmap_port_ext_cleanup testing release v5.3 testing commit 4d856f72c10ecb060868ed10ff1b1453943fc6c8 with gcc (GCC) 8.1.0 kernel signature: 670e759258dd475644c3463f0310cebf379e5a6f all runs: crashed: KASAN: use-after-free Read in bitmap_port_ext_cleanup testing release v5.2 testing commit 0ecfebd2b52404ae0c54a878c872bb93363ada36 with gcc (GCC) 8.1.0 kernel signature: e907cbc3b91e9adb4e84c88c8bcf92bc13e60544 all runs: OK # git bisect start 4d856f72c10ecb060868ed10ff1b1453943fc6c8 0ecfebd2b52404ae0c54a878c872bb93363ada36 Bisecting: 7848 revisions left to test after this (roughly 13 steps) [43c95d3694cc448fdf50bd53b7ff3a5bb4655883] Merge tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl testing commit 43c95d3694cc448fdf50bd53b7ff3a5bb4655883 with gcc (GCC) 8.1.0 kernel signature: 6afc635345c13681d36cb05db7afbe5b2aeb1170 all runs: crashed: KASAN: use-after-free Read in bitmap_port_ext_cleanup # git bisect bad 43c95d3694cc448fdf50bd53b7ff3a5bb4655883 Bisecting: 4619 revisions left to test after this (roughly 12 steps) [8f6ccf6159aed1f04c6d179f61f6fb2691261e84] Merge tag 'clone3-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux testing commit 8f6ccf6159aed1f04c6d179f61f6fb2691261e84 with gcc (GCC) 8.1.0 kernel signature: 7b22b99417201cb4b86eccd484f3ff9dd364a9c8 all runs: OK # git bisect good 8f6ccf6159aed1f04c6d179f61f6fb2691261e84 Bisecting: 2306 revisions left to test after this (roughly 11 steps) [753c8d9b7d81206bb5d011b28abe829d364b028e] Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 753c8d9b7d81206bb5d011b28abe829d364b028e with gcc (GCC) 8.1.0 kernel signature: 7ae4caf0dafa319121c801155d3dd822554e9ebc run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 753c8d9b7d81206bb5d011b28abe829d364b028e Bisecting: 1156 revisions left to test after this (roughly 10 steps) [2f9b0d93a9d3ec64558537ab5d7cff820886afa4] net: ethernet: ti: cpsw: Fix suspend/resume break testing commit 2f9b0d93a9d3ec64558537ab5d7cff820886afa4 with gcc (GCC) 8.1.0 kernel signature: 588ba7d2fd5bfbef3ca9d5fb5c3af3dff8f3a93f all runs: OK # git bisect good 2f9b0d93a9d3ec64558537ab5d7cff820886afa4 Bisecting: 578 revisions left to test after this (roughly 9 steps) [354d0fab649d47045517cf7cae03d653a4dcb3b8] net: hns3: add default value for tc_size and tc_offset testing commit 354d0fab649d47045517cf7cae03d653a4dcb3b8 with gcc (GCC) 8.1.0 kernel signature: 8c85b4bdc0ca8970d9117bfa5e9b3bfb1a652131 all runs: OK # git bisect good 354d0fab649d47045517cf7cae03d653a4dcb3b8 Bisecting: 289 revisions left to test after this (roughly 8 steps) [52c0609258658ff35b85c654c568a50abd602ac6] bnxt_en: rename some xdp functions testing commit 52c0609258658ff35b85c654c568a50abd602ac6 with gcc (GCC) 8.1.0 kernel signature: 17a2161365a4561ec9d2f569f6fe65547cc3b36a all runs: OK # git bisect good 52c0609258658ff35b85c654c568a50abd602ac6 Bisecting: 169 revisions left to test after this (roughly 7 steps) [e858faf556d4e14c750ba1e8852783c6f9520a0e] tcp: Reset bytes_acked and bytes_received when disconnecting testing commit e858faf556d4e14c750ba1e8852783c6f9520a0e with gcc (GCC) 8.1.0 kernel signature: 2ff5122765284852714e53803d3ba4e4bec53f2f run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad e858faf556d4e14c750ba1e8852783c6f9520a0e Bisecting: 59 revisions left to test after this (roughly 6 steps) [3d26eb8ad1e9b906433903ce05f775cf038e747f] net: bridge: don't cache ether dest pointer on input testing commit 3d26eb8ad1e9b906433903ce05f775cf038e747f with gcc (GCC) 8.1.0 kernel signature: c4fbbf042971874cbf40380845ca892e873da5d6 all runs: OK # git bisect good 3d26eb8ad1e9b906433903ce05f775cf038e747f Bisecting: 30 revisions left to test after this (roughly 5 steps) [9d1bc24b52fb8c5d859f9a47084bf1179470e04c] bonding: validate ip header before check IPPROTO_IGMP testing commit 9d1bc24b52fb8c5d859f9a47084bf1179470e04c with gcc (GCC) 8.1.0 kernel signature: caae3967d10893028b7969bdc41e911d6f6f18a7 all runs: OK # git bisect good 9d1bc24b52fb8c5d859f9a47084bf1179470e04c Bisecting: 15 revisions left to test after this (roughly 4 steps) [13aecb17acabc2a92187d08f7ca93bb8aad62c6f] net/tls: fix poll ignoring partially copied records testing commit 13aecb17acabc2a92187d08f7ca93bb8aad62c6f with gcc (GCC) 8.1.0 kernel signature: 1e93714004d640afc11a9fb1ac9d856390a2e45c run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 13aecb17acabc2a92187d08f7ca93bb8aad62c6f Bisecting: 7 revisions left to test after this (roughly 3 steps) [56c5ee1a5823e9cf5288b84ae6364cb4112f8225] xfrm interface: fix memory leak on creation testing commit 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 with gcc (GCC) 8.1.0 kernel signature: 3e46c8659d0393404cfb90d4063e6597c8d384b6 all runs: OK # git bisect good 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 Bisecting: 3 revisions left to test after this (roughly 2 steps) [edf070a0fb45ac845f534baf172fbadbeb5048c6] hsr: fix a NULL pointer deref in hsr_dev_xmit() testing commit edf070a0fb45ac845f534baf172fbadbeb5048c6 with gcc (GCC) 8.1.0 kernel signature: 213e4504bbf7b714230b1c0f0690ec3d3a54c585 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad edf070a0fb45ac845f534baf172fbadbeb5048c6 Bisecting: 1 revision left to test after this (roughly 1 step) [619afef01f74f3572b5e9a266c1230dc83761eec] hsr: fix a memory leak in hsr_del_port() testing commit 619afef01f74f3572b5e9a266c1230dc83761eec with gcc (GCC) 8.1.0 kernel signature: 2da5bc851a87f45a5478c054c726513b1cc10bf4 all runs: OK # git bisect good 619afef01f74f3572b5e9a266c1230dc83761eec Bisecting: 0 revisions left to test after this (roughly 0 steps) [b9a1e627405d68d475a3c1f35e685ccfb5bbe668] hsr: implement dellink to clean up resources testing commit b9a1e627405d68d475a3c1f35e685ccfb5bbe668 with gcc (GCC) 8.1.0 kernel signature: d362884e8693141afb0162fa9b9f8b0c40411bb9 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad b9a1e627405d68d475a3c1f35e685ccfb5bbe668 b9a1e627405d68d475a3c1f35e685ccfb5bbe668 is the first bad commit commit b9a1e627405d68d475a3c1f35e685ccfb5bbe668 Author: Cong Wang Date: Wed Jul 3 17:21:13 2019 -0700 hsr: implement dellink to clean up resources hsr_link_ops implements ->newlink() but not ->dellink(), which leads that resources not released after removing the device, particularly the entries in self_node_db and node_db. So add ->dellink() implementation to replace the priv_destructor. This also makes the code slightly easier to understand. Reported-by: syzbot+c6167ec3de7def23d1e8@syzkaller.appspotmail.com Cc: Arvid Brodin Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/hsr/hsr_device.c | 13 +++++-------- net/hsr/hsr_device.h | 1 + net/hsr/hsr_framereg.c | 11 ++++++++++- net/hsr/hsr_framereg.h | 3 ++- net/hsr/hsr_netlink.c | 7 +++++++ 5 files changed, 25 insertions(+), 10 deletions(-) culprit signature: d362884e8693141afb0162fa9b9f8b0c40411bb9 parent signature: 2da5bc851a87f45a5478c054c726513b1cc10bf4 revisions tested: 18, total time: 4h41m13.500274254s (build: 1h49m13.656336057s, test: 2h50m46.162429627s) first bad commit: b9a1e627405d68d475a3c1f35e685ccfb5bbe668 hsr: implement dellink to clean up resources cc: ["arvid.brodin@alten.se" "davem@davemloft.net" "linux-kernel@vger.kernel.org" "netdev@vger.kernel.org" "xiyou.wangcong@gmail.com"] crash: general protection fault in send_hsr_supervision_frame kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.2.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:send_hsr_supervision_frame+0x30/0xf60 net/hsr/hsr_device.c:251 Code: 89 e5 41 57 41 56 41 55 49 89 fd 41 54 41 89 d4 48 89 c2 53 48 c1 ea 03 48 83 ec 50 48 89 45 d0 48 b8 00 00 00 00 00 fc ff df <80> 3c 02 00 89 75 c8 0f 85 83 0c 00 00 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffff8880ae809c68 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: ffff8880a60cd040 RCX: ffffffff81563af4 RDX: 0000000000000002 RSI: 0000000000000017 RDI: 0000000000000000 RBP: ffff8880ae809ce0 R08: ffffed1015d06c78 R09: ffffed1015d06c77 R10: ffffed1015d06c77 R11: ffff8880ae8363bb R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880ae809db8 R15: ffff8880ae824b80 FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000080d6f40 CR3: 000000000886d000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hsr_announce+0xd9/0x2b0 net/hsr/hsr_device.c:335 call_timer_fn+0x14d/0x510 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] run_timer_softirq+0xc6f/0x1330 kernel/time/timer.c:1698 __do_softirq+0x260/0x958 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13e/0x540 arch/x86/kernel/apic/apic.c:1068 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806 RIP: 0010:native_safe_halt+0x12/0x20 arch/x86/include/asm/irqflags.h:61 Code: 11 ff ff ff 4c 89 e7 e8 fc a1 96 fa eb 97 90 90 90 90 90 90 90 90 90 90 55 48 89 e5 e9 07 00 00 00 0f 00 2d e0 bd 65 00 fb f4 <5d> c3 66 90 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 e9 07 00 00 RSP: 0018:ffffffff88807ce0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffffffff8887a040 RCX: 0000000000000000 RDX: 1ffffffff11243e1 RSI: 0000000000000006 RDI: ffffffff88921f08 RBP: ffffffff88807ce0 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff88921ef8 R14: 0000000000000000 R15: ffffffff89677978 arch_safe_halt arch/x86/include/asm/paravirt.h:156 [inline] default_idle+0x51/0x310 arch/x86/kernel/process.c:580 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571 default_idle_call+0x6d/0x90 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3e4/0x590 kernel/sched/idle.c:263 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:354 rest_init+0x1a4/0x279 init/main.c:451 arch_call_rest_init+0x9/0xc start_kernel+0x6bd/0x6f8 init/main.c:761 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 Modules linked in: ---[ end trace 90811576dd47eee9 ]--- RIP: 0010:send_hsr_supervision_frame+0x30/0xf60 net/hsr/hsr_device.c:251 Code: 89 e5 41 57 41 56 41 55 49 89 fd 41 54 41 89 d4 48 89 c2 53 48 c1 ea 03 48 83 ec 50 48 89 45 d0 48 b8 00 00 00 00 00 fc ff df <80> 3c 02 00 89 75 c8 0f 85 83 0c 00 00 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffff8880ae809c68 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: ffff8880a60cd040 RCX: ffffffff81563af4 RDX: 0000000000000002 RSI: 0000000000000017 RDI: 0000000000000000 RBP: ffff8880ae809ce0 R08: ffffed1015d06c78 R09: ffffed1015d06c77 R10: ffffed1015d06c77 R11: ffff8880ae8363bb R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880ae809db8 R15: ffff8880ae824b80 FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000080d6f40 CR3: 000000000886d000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400