syzbot


general protection fault in nf_ct_netns_do_get

Status: fixed on 2021/10/12 13:38
Reported-by: syzbot+96986d0800d94572d21e@syzkaller.appspotmail.com
Fix commit: 503ff0dcfba7 netfilter: arp_tables: init netns pointer in xt_tgchk_param struct
First crash: 1564d, last: 1564d
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 1567d 1578d 0/26 closed as dup on 2020/01/07 13:55
linux-4.19 general protection fault in nf_ct_netns_do_get C done 11 1564d 1578d 1/1 fixed on 2020/02/14 00:35

Sample crash report:
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: 1886 Comm: syz-executor075 Not tainted 5.4.10-syzkaller-00217-gf5f770e495ba #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline]
RIP: 0010:net_generic include/net/netns/generic.h:45 [inline]
RIP: 0010:nf_ct_netns_do_get+0x53/0x560 net/netfilter/nf_conntrack_proto.c:449
Code: 00 00 fc ff df 42 8a 04 28 84 c0 0f 85 67 04 00 00 8b 1d 04 9e 7f 01 e8 fb 59 3b fe 4d 8d be 30 0c 00 00 4c 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 ff e8 3e e2 7a fe 4c 89 75 d0 48 c1 e3
RSP: 0018:ffff8881d084f630 EFLAGS: 00010202
RAX: 0000000000000186 RBX: 000000000000000a RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000000
RBP: ffff8881d084f660 R08: 0000000000000001 R09: ffffffff82f59d65
R10: ffff8881d397ac40 R11: 0000000000000002 R12: 0000000000000003
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000c30
FS:  0000000001677880(0000) GS:ffff8881dba00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000420 CR3: 00000001d1f3b003 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 nf_ct_netns_get+0xf3/0x420 net/netfilter/nf_conntrack_proto.c:601
 connmark_tg_check+0x57/0x100 net/netfilter/xt_connmark.c:106
 xt_check_target+0x70f/0xbc0 net/netfilter/x_tables.c:1019
 check_target net/ipv4/netfilter/arp_tables.c:399 [inline]
 find_check_entry net/ipv4/netfilter/arp_tables.c:422 [inline]
 translate_table+0x1b44/0x2270 net/ipv4/netfilter/arp_tables.c:572
 do_replace net/ipv4/netfilter/arp_tables.c:977 [inline]
 do_arpt_set_ctl+0x385/0x7f0 net/ipv4/netfilter/arp_tables.c:1456
 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
 nf_setsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:115
 ip_setsockopt+0xc7/0xe0 net/ipv4/ip_sockglue.c:1260
 udp_setsockopt+0x79/0x90 net/ipv4/udp.c:2637
 sock_common_setsockopt+0x99/0xb0 net/core/sock.c:3151
 __sys_setsockopt+0x4ee/0x8b0 net/socket.c:2085
 __do_sys_setsockopt net/socket.c:2101 [inline]
 __se_sys_setsockopt net/socket.c:2098 [inline]
 __x64_sys_setsockopt+0xbf/0xd0 net/socket.c:2098
 do_syscall_64+0xc0/0x100 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4416c9
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:00007ffd04cbf0e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004416c9
RDX: 0000000000000060 RSI: 0a02000000000000 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 00000000000003d7 R09: 00000000004002c8
R10: 0000000020000400 R11: 0000000000000246 R12: 0000000000402f50
R13: 0000000000402fe0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace dcc005c56d1b5a73 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline]
RIP: 0010:net_generic include/net/netns/generic.h:45 [inline]
RIP: 0010:nf_ct_netns_do_get+0x53/0x560 net/netfilter/nf_conntrack_proto.c:449
Code: 00 00 fc ff df 42 8a 04 28 84 c0 0f 85 67 04 00 00 8b 1d 04 9e 7f 01 e8 fb 59 3b fe 4d 8d be 30 0c 00 00 4c 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 ff e8 3e e2 7a fe 4c 89 75 d0 48 c1 e3
RSP: 0018:ffff8881d084f630 EFLAGS: 00010202
RAX: 0000000000000186 RBX: 000000000000000a RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000000
RBP: ffff8881d084f660 R08: 0000000000000001 R09: ffffffff82f59d65
R10: ffff8881d397ac40 R11: 0000000000000002 R12: 0000000000000003
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000c30
FS:  0000000001677880(0000) GS:ffff8881dba00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000420 CR3: 00000001d1f3b003 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/11 13:00 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report syz C ci2-android-5-4-kasan
2020/01/11 06:01 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report syz C ci2-android-5-4-kasan
2020/01/11 06:40 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 06:20 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 06:19 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 06:10 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 06:09 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 05:58 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 05:49 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
2020/01/11 05:49 https://android.googlesource.com/kernel/common android-5.4 f5f770e495ba 4c04afaa .config console log report ci2-android-5-4-kasan
* Struck through repros no longer work on HEAD.