general protection fault in nf_ct_netns_do_get

8 views
Skip to first unread message

syzbot

unread,
Dec 27, 2019, 9:25:09 PM12/27/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 672481c2 Linux 4.19.91
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=160c7615e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=445a712574d168a6
dashboard link: https://syzkaller.appspot.com/bug?extid=0961add6bea42a2e3320
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1710c6b9e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10cfee15e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+0961ad...@syzkaller.appspotmail.com

kauditd_printk_skb: 3 callbacks suppressed
audit: type=1400 audit(1577499688.858:36): avc: denied { map } for
pid=7752 comm="syz-executor339" path="/root/syz-executor339418214"
dev="sda1" ino=16483 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: 1 PID: 7752 Comm: syz-executor339 Not tainted 4.19.91-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: 76 7b fb 45 84 ff 0f 84 6f 02 00 00 e8 06 75 7b 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 96 86 68
RSP: 0018:ffff8880a829f808 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: ffffffff85efd1ba
RDX: 0000000000000369 RSI: ffffffff85efcf3a RDI: 0000000000001b48
RBP: ffff8880a829f838 R08: ffff88809153c3c0 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 0000000000000000
R13: 0000000000000003 R14: 0000000000000028 R15: 0000000000000001
FS: 0000000002081880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005570bd293180 CR3: 000000009670a000 CR4: 00000000001406e0
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:0x441369
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:00007fffa9e149a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000441369
RDX: 0000000000000060 RSI: 0a02000000000000 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 0000000000000418 R09: 00000000004002c8
R10: 0000000020000880 R11: 0000000000000246 R12: 0000000000402bf0
R13: 0000000000402c80 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 274f94ba5b6de556 ]---
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: 76 7b fb 45 84 ff 0f 84 6f 02 00 00 e8 06 75 7b 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 96 86 68
RSP: 0018:ffff8880a829f808 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: ffffffff85efd1ba
RDX: 0000000000000369 RSI: ffffffff85efcf3a RDI: 0000000000001b48
RBP: ffff8880a829f838 R08: ffff88809153c3c0 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 0000000000000000
R13: 0000000000000003 R14: 0000000000000028 R15: 0000000000000001
FS: 0000000002081880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005570bd293180 CR3: 000000009670a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Feb 13, 2020, 4:49:03 PM2/13/20
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 46abb2a5cd2f34a8fa67df24f5b33a494e42f9ec
Author: Florian Westphal <f...@strlen.de>
Date: Fri Dec 27 00:33:10 2019 +0000

netfilter: arp_tables: init netns pointer in xt_tgchk_param struct

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12b25c09e00000
start commit: cb1f9a16 Linux 4.19.94
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=9d03b07719ed036e
dashboard link: https://syzkaller.appspot.com/bug?extid=0961add6bea42a2e3320
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15bff9e1e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10705021e00000

If the result looks correct, please mark the bug fixed by replying with:

#syz fix: netfilter: arp_tables: init netns pointer in xt_tgchk_param struct

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages