bisecting cause commit starting from 25e73aadf297d78cf528841795cd37bad8320642 building syzkaller on 3de7aabbb79a6c2267f5d7ee8a8aaa83f63305b7 testing commit 25e73aadf297d78cf528841795cd37bad8320642 with gcc (GCC) 8.1.0 kernel signature: 8a71d0c4b42b75e7903a829788297fb631c0f9f9 all runs: crashed: KASAN: slab-out-of-bounds Read in bitmap_port_gc testing release v5.4 testing commit 219d54332a09e8d8741c1e1982f5eae56099de85 with gcc (GCC) 8.1.0 kernel signature: 46af79d54a3ad7deed53be0c3105eff97d408bc9 all runs: crashed: KASAN: slab-out-of-bounds Read in bitmap_port_gc testing release v5.3 testing commit 4d856f72c10ecb060868ed10ff1b1453943fc6c8 with gcc (GCC) 8.1.0 kernel signature: 4e978d7cd137ada74e0c6be3ad1181af716b23aa all runs: crashed: KASAN: slab-out-of-bounds Read in bitmap_port_gc testing release v5.2 testing commit 0ecfebd2b52404ae0c54a878c872bb93363ada36 with gcc (GCC) 8.1.0 kernel signature: fcab830b7433353b9d7b9c9fd9f1fd6833a34741 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: 982281759a5df850fd63e6e606e94629d0348bed all runs: crashed: KASAN: slab-out-of-bounds Read in bitmap_port_gc # 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: a4e2f78d3ffdbde6fe9d455bd0769b115384e19e 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: b0e55291ca504701b9f7978371688afc801a4350 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 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: 828b5b84955a7332027db3843eadffb673da3932 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: 00c1d54138c48c8adf16bd8c8d1d3b1f30ac74b5 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: b57bfa26863bf2e3ddac29c57ac550f0a4778645 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: 3b040daae8e854b511d7d8adce2beb28d6f9fc39 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: crashed: general protection fault in send_hsr_supervision_frame 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: 00c0ebef30d873194fcc836cb59a1aad5a137f2f 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: 9b442c8cd81d34df40ff462b26e4efe9c303d6aa 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: a0fea58a41a7e1c01a51734031b2a6f2868921cf 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 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: d30b1c5aa59adea34682d36c1892d125d74ba02b 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: 5b5a1596c0d7d4cbbfafbf8b7ca2a16dc763a19d 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: 6d59fe382041528c7d587ef372a55164d8e935ec 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: 2ab522e4428727ab14b44753860c0763ed45d77e 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: crashed: general protection fault in send_hsr_supervision_frame 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: 2ab522e4428727ab14b44753860c0763ed45d77e parent signature: 6d59fe382041528c7d587ef372a55164d8e935ec revisions tested: 18, total time: 4h48m30.409293181s (build: 1h52m56.24759875s, test: 2h53m33.525781439s) 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: 24893 Comm: syz-executor951 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: ffff88809ef22d00 RCX: ffffffff815611e4 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: 0000555556bf6880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004b60b8 CR3: 000000008dc27000 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:getname_flags+0xae/0x510 fs/namei.c:138 Code: 00 49 c7 c7 b8 8f 67 89 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 9c 03 00 00 48 8b 3d 2a 86 c3 07 c0 0c 00 00 e8 f8 9d f3 ff 48 85 c0 48 89 c3 0f 84 5f 01 00 00 RSP: 0018:ffff88807849fe00 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 1ffffffff12cf1f7 RSI: 0000000000000000 RDI: ffff8880aa57bc40 RBP: ffff88807849fe38 R08: 0000000000000002 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000004a262a R13: 0000000000000000 R14: 0000000000000000 R15: ffffffff89678fb8 getname+0xd/0x10 fs/namei.c:209 do_sys_open+0x14c/0x370 fs/open.c:1064 __do_sys_open fs/open.c:1088 [inline] __se_sys_open fs/open.c:1083 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1083 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x401380 Code: 01 f0 ff ff 0f 83 c0 0b 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 4d 23 2d 00 00 75 14 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 94 0b 00 00 c3 48 83 ec 08 e8 fa 00 00 00 RSP: 002b:00007ffff886b818 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000401380 RDX: 00007ffff886b844 RSI: 0000000000080001 RDI: 00000000004a262a RBP: 00007ffff886b840 R08: 0000000000000000 R09: 0000000000000004 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004a262a R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace d49778cdda2fcb50 ]--- 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: ffff88809ef22d00 RCX: ffffffff815611e4 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: 0000555556bf6880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004b60b8 CR3: 000000008dc27000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400