syzbot


general protection fault in nf_ct_netns_do_get

Status: fixed on 2020/02/14 00:35
Reported-by: syzbot+0961add6bea42a2e3320@syzkaller.appspotmail.com
Fix commit: 46abb2a5cd2f netfilter: arp_tables: init netns pointer in xt_tgchk_param struct
First crash: 1790d, last: 1776d
Fix bisection: fixed by (bisect log) :
commit 46abb2a5cd2f34a8fa67df24f5b33a494e42f9ec
Author: Florian Westphal <fw@strlen.de>
Date: Fri Dec 27 00:33:10 2019 +0000

  netfilter: arp_tables: init netns pointer in xt_tgchk_param struct

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in nf_ct_netns_do_get netfilter C done 7 1778d 1790d 0/28 closed as dup on 2020/01/07 13:55
android-54 general protection fault in nf_ct_netns_do_get C 10 1776d 1776d 1/2 fixed on 2021/10/12 13:38

Sample crash report:
kauditd_printk_skb: 2 callbacks suppressed
audit: type=1400 audit(1578754924.785:36): avc:  denied  { map } for  pid=7970 comm="syz-executor839" path="/root/syz-executor839806223" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
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: 7970 Comm: syz-executor839 Not tainted 4.19.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:193 [inline]
RIP: 0010:net_generic include/net/netns/generic.h:45 [inline]
RIP: 0010:nf_ct_netns_do_get+0xd3/0x5c0 net/netfilter/nf_conntrack_proto.c:797
Code: 92 73 fb 45 84 ff 0f 84 6f 02 00 00 e8 e6 90 73 fb 49 8d bc 24 48 1b 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 cd 04 00 00 4d 8b bc 24 48 1b 00 00 e8 a6 a1 60
RSP: 0018:ffff888097fe7808 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: ffffffff85f7874a
RDX: 0000000000000369 RSI: ffffffff85f784ca RDI: 0000000000001b48
RBP: ffff888097fe7838 R08: ffff88809164c4c0 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: 0000000000000000
R13: 0000000000000003 R14: 0000000000000028 R15: 0000000000000001
FS:  00000000017a4880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000880 CR3: 000000008b4d6000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 nf_ct_netns_get+0x3d/0xc0 net/netfilter/nf_conntrack_proto.c:889
 connmark_tg_check+0x61/0xe0 net/netfilter/xt_connmark.c:118
 xt_check_target+0x283/0x6a0 net/netfilter/x_tables.c:1024
 check_target net/ipv4/netfilter/arp_tables.c:398 [inline]
 find_check_entry net/ipv4/netfilter/arp_tables.c:421 [inline]
 translate_table+0x1005/0x1d70 net/ipv4/netfilter/arp_tables.c:571
 do_replace net/ipv4/netfilter/arp_tables.c:976 [inline]
 do_arpt_set_ctl+0x303/0x640 net/ipv4/netfilter/arp_tables.c:1455
 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
 nf_setsockopt+0x77/0xd0 net/netfilter/nf_sockopt.c:115
 ip_setsockopt net/ipv4/ip_sockglue.c:1258 [inline]
 ip_setsockopt+0xdf/0x100 net/ipv4/ip_sockglue.c:1238
 udp_setsockopt+0x68/0xb0 net/ipv4/udp.c:2548
 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3046
 __sys_setsockopt+0x17a/0x280 net/socket.c:1901
 __do_sys_setsockopt net/socket.c:1912 [inline]
 __se_sys_setsockopt net/socket.c:1909 [inline]
 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1909
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440159
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd4c712158 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440159
RDX: 0000000000000060 RSI: 0a02000000000000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000001 R09: 00000000004002c8
R10: 0000000020000880 R11: 0000000000000246 R12: 00000000004019e0
R13: 0000000000401a70 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 48df9df439930e6e ]---
RIP: 0010:__read_once_size include/linux/compiler.h:193 [inline]
RIP: 0010:net_generic include/net/netns/generic.h:45 [inline]
RIP: 0010:nf_ct_netns_do_get+0xd3/0x5c0 net/netfilter/nf_conntrack_proto.c:797
Code: 92 73 fb 45 84 ff 0f 84 6f 02 00 00 e8 e6 90 73 fb 49 8d bc 24 48 1b 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 cd 04 00 00 4d 8b bc 24 48 1b 00 00 e8 a6 a1 60
RSP: 0018:ffff888097fe7808 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: ffffffff85f7874a
RDX: 0000000000000369 RSI: ffffffff85f784ca RDI: 0000000000001b48
RBP: ffff888097fe7838 R08: ffff88809164c4c0 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: 0000000000000000
R13: 0000000000000003 R14: 0000000000000028 R15: 0000000000000001
FS:  00000000017a4880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000880 CR3: 000000008b4d6000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/11 15:04 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/11 10:41 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2019/12/28 02:24 linux-4.19.y 672481c2deff be5c2c81 .config console log report syz C ci2-linux-4-19
2020/01/11 06:38 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 06:19 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 06:17 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 06:08 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 06:08 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 05:57 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 05:48 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 05:48 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.