general protection fault in nf_nat_setup_info

12 views
Skip to first unread message

syzbot

unread,
Jul 28, 2020, 7:16:20 AM7/28/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 69b94dd6 Linux 4.14.189
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12561b74900000
kernel config: https://syzkaller.appspot.com/x/.config?x=80d63ff414fa81b0
dashboard link: https://syzkaller.appspot.com/bug?extid=e941eb36e7b3488fda6f
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

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

audit: type=1400 audit(1595934923.328:55): avc: denied { ioctl } for pid=25157 comm="syz-executor.1" path="socket:[63931]" dev="sockfs" ino=63931 ioctlcmd=0x2284 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=dccp_socket 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
Modules linked in:
CPU: 0 PID: 25168 Comm: syz-executor.0 Not tainted 4.14.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88804dd90180 task.stack: ffff8881e8590000
RIP: 0010:__read_once_size include/linux/compiler.h:183 [inline]
RIP: 0010:__nf_nat_l4proto_find net/netfilter/nf_nat_core.c:54 [inline]
RIP: 0010:get_unique_tuple net/netfilter/nf_nat_core.c:313 [inline]
RIP: 0010:nf_nat_setup_info+0x28c/0x1a80 net/netfilter/nf_nat_core.c:407
RSP: 0018:ffff8881e8596fa8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90005a82000
RDX: 0000000000000000 RSI: ffffffff85388edd RDI: ffffffff88934170
RBP: ffff8881e8597168 R08: ffffffff85388e2a R09: 0000000000020012
R10: ffff88804dd90a58 R11: ffff88804dd90180 R12: ffff8881e8597048
R13: 0000000000000012 R14: 0000000000000000 R15: ffff88805163bd80
FS: 00007fd72d9a5700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b4a8cfebb0 CR3: 0000000205071000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__nf_nat_alloc_null_binding+0x13f/0x180 net/netfilter/nf_nat_core.c:466
nfnetlink_parse_nat_setup+0x483/0x560 net/netfilter/nf_nat_core.c:782
ctnetlink_parse_nat_setup+0x70/0x490 net/netfilter/nf_conntrack_netlink.c:1421
ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1491 [inline]
ctnetlink_create_conntrack+0x43b/0x1050 net/netfilter/nf_conntrack_netlink.c:1840
ctnetlink_new_conntrack+0x457/0xbf0 net/netfilter/nf_conntrack_netlink.c:1964
nfnetlink_rcv_msg+0x9bb/0xc00 net/netfilter/nfnetlink.c:214
netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433
nfnetlink_rcv+0x1ab/0x1da0 net/netfilter/nfnetlink.c:515
netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline]
netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313
netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:656
___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
__sys_sendmsg+0xa3/0x120 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2103
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x45c369
RSP: 002b:00007fd72d9a4c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000028ec0 RCX: 000000000045c369
RDX: 0000000000000000 RSI: 0000000020000580 RDI: 0000000000000003
RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c
R13: 00007fff06dc83ff R14: 00007fd72d9a59c0 R15: 000000000078bf0c
Code: 48 c1 ea 03 80 3c 02 00 0f 85 cd 15 00 00 4a 8b 04 ed e0 40 93 88 48 8d 1c d8 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 ca 15 00 00 48 8b 03 48 89 85 78 fe ff ff e8
RIP: __read_once_size include/linux/compiler.h:183 [inline] RSP: ffff8881e8596fa8
RIP: __nf_nat_l4proto_find net/netfilter/nf_nat_core.c:54 [inline] RSP: ffff8881e8596fa8
RIP: get_unique_tuple net/netfilter/nf_nat_core.c:313 [inline] RSP: ffff8881e8596fa8
RIP: nf_nat_setup_info+0x28c/0x1a80 net/netfilter/nf_nat_core.c:407 RSP: ffff8881e8596fa8
---[ end trace 0ce4e82c9e75bd8f ]---


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jul 28, 2020, 7:31:19 AM7/28/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 69b94dd6 Linux 4.14.189
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14be2460900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17353728900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11a25e38900000

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

audit: type=1400 audit(1595935768.255:8): avc: denied { execmem } for pid=6327 comm="syz-executor516" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process 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
Modules linked in:
CPU: 1 PID: 6327 Comm: syz-executor516 Not tainted 4.14.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880862fc340 task.stack: ffff888084560000
RIP: 0010:__read_once_size include/linux/compiler.h:183 [inline]
RIP: 0010:__nf_nat_l4proto_find net/netfilter/nf_nat_core.c:54 [inline]
RIP: 0010:get_unique_tuple net/netfilter/nf_nat_core.c:313 [inline]
RIP: 0010:nf_nat_setup_info+0x28c/0x1a80 net/netfilter/nf_nat_core.c:407
RSP: 0018:ffff888084566fa8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff88934170
RBP: ffff888084567168 R08: ffffffff85388e2a R09: 0000000000020012
R10: ffff8880862fcc18 R11: ffff8880862fc340 R12: ffff888084567048
R13: 0000000000000012 R14: 0000000000000000 R15: ffff88808f3c7dc0
FS: 000000000150f880(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c578dd6c0 CR3: 0000000087f8e000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__nf_nat_alloc_null_binding+0x13f/0x180 net/netfilter/nf_nat_core.c:466
nfnetlink_parse_nat_setup+0x483/0x560 net/netfilter/nf_nat_core.c:782
ctnetlink_parse_nat_setup+0x70/0x490 net/netfilter/nf_conntrack_netlink.c:1421
ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1491 [inline]
ctnetlink_create_conntrack+0x43b/0x1050 net/netfilter/nf_conntrack_netlink.c:1840
ctnetlink_new_conntrack+0x457/0xbf0 net/netfilter/nf_conntrack_netlink.c:1964
nfnetlink_rcv_msg+0x9bb/0xc00 net/netfilter/nfnetlink.c:214
netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433
nfnetlink_rcv+0x1ab/0x1da0 net/netfilter/nfnetlink.c:515
netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline]
netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313
netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:656
___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
__sys_sendmsg+0xa3/0x120 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2103
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x440309
RSP: 002b:00007ffc49f26af8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440309
RDX: 0000000000000000 RSI: 0000000020000580 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b10
R13: 0000000000401ba0 R14: 0000000000000000 R15: 0000000000000000
Code: 48 c1 ea 03 80 3c 02 00 0f 85 cd 15 00 00 4a 8b 04 ed e0 40 93 88 48 8d 1c d8 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 ca 15 00 00 48 8b 03 48 89 85 78 fe ff ff e8
RIP: __read_once_size include/linux/compiler.h:183 [inline] RSP: ffff888084566fa8
RIP: __nf_nat_l4proto_find net/netfilter/nf_nat_core.c:54 [inline] RSP: ffff888084566fa8
RIP: get_unique_tuple net/netfilter/nf_nat_core.c:313 [inline] RSP: ffff888084566fa8
RIP: nf_nat_setup_info+0x28c/0x1a80 net/netfilter/nf_nat_core.c:407 RSP: ffff888084566fa8
---[ end trace 5a12a273a189249a ]---

Reply all
Reply to author
Forward
0 new messages