Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in free_netdev
IPVS: ftp: loaded support on port[0] = 21
general protection fault, probably for non-canonical address 0xdffffc0000000080: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000400-0x0000000000000407]
CPU: 1 PID: 15641 Comm: syz-executor.2 Not tainted 5.8.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:netif_free_tx_queues net/core/dev.c:9371 [inline]
RIP: 0010:free_netdev+0x41/0x480 net/core/dev.c:10042
Code: d2 be 39 27 00 00 48 c7 c7 e0 77 fd 88 e8 07 37 1c fb 48 8d bd 00 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 f4 03 00 00 48 8b bd 00 04 00 00 e8 49 c3 69 fb
RSP: 0018:ffffc900076efc10 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff88808fdbe000 RCX: ffffffff86fada0b
RDX: 0000000000000080 RSI: ffffffff89bc0e00 RDI: 0000000000000400
RBP: 0000000000000000 R08: 0000000000000001 R09: ffffffff8a7b5447
R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffff4
R13: ffff8880a8b35410 R14: ffff88806aee3000 R15: ffff8880a36734b8
FS: 00007f13cb47c700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004fdcf0 CR3: 00000000a773a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ip6gre_init_net+0x546/0x610 net/ipv6/ip6_gre.c:1595
ops_init+0xaf/0x470 net/core/net_namespace.c:151
setup_net+0x2d8/0x850 net/core/net_namespace.c:341
copy_net_ns+0x2cf/0x5e0 net/core/net_namespace.c:482
create_new_namespaces+0x3f6/0xb10 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:231
ksys_unshare+0x36c/0x9a0 kernel/fork.c:2979
__do_sys_unshare kernel/fork.c:3047 [inline]
__se_sys_unshare kernel/fork.c:3045 [inline]
__x64_sys_unshare+0x2d/0x40 kernel/fork.c:3045
do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45cba9
Code: Bad RIP value.
RSP: 002b:00007f13cb47bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 000000000050bb60 RCX: 000000000045cba9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000000
RBP: 000000000078bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000c91 R14: 00000000004cef3e R15: 00007f13cb47c6d4
Modules linked in:
---[ end trace 3d28a0c8c4731f0a ]---
RIP: 0010:netif_free_tx_queues net/core/dev.c:9371 [inline]
RIP: 0010:free_netdev+0x41/0x480 net/core/dev.c:10042
Code: d2 be 39 27 00 00 48 c7 c7 e0 77 fd 88 e8 07 37 1c fb 48 8d bd 00 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 f4 03 00 00 48 8b bd 00 04 00 00 e8 49 c3 69 fb
RSP: 0018:ffffc900076efc10 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff88808fdbe000 RCX: ffffffff86fada0b
RDX: 0000000000000080 RSI: ffffffff89bc0e00 RDI: 0000000000000400
RBP: 0000000000000000 R08: 0000000000000001 R09: ffffffff8a7b5447
R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffff4
R13: ffff8880a8b35410 R14: ffff88806aee3000 R15: ffff8880a36734b8
FS: 00007f13cb47c700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005618c25064c0 CR3: 00000000a773a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Tested on:
commit: fa56a987 Merge branch 'ionic-updates'
git tree:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master
console output:
https://syzkaller.appspot.com/x/log.txt?x=13ce0c30900000
kernel config:
https://syzkaller.appspot.com/x/.config?x=c4583cf0a8f95675
dashboard link:
https://syzkaller.appspot.com/bug?extid=ed318e8b790ca72c5ad0
compiler: gcc (GCC) 10.1.0-syz 20200507
patch:
https://syzkaller.appspot.com/x/patch.diff?x=12e8f437100000