general protection fault in nfnetlink_parse_nat_setup

11 views
Skip to first unread message

syzbot

unread,
Jan 17, 2020, 12:27:12 PM1/17/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: c04fc6fa Linux 4.14.165
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=137bfdb9e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d36f53294bbc71f0
dashboard link: https://syzkaller.appspot.com/bug?extid=9b4048a361a7fb331306
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

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

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

kasan: CONFIG_KASAN_INLINE enabled
IPv6: ADDRCONF(NETDEV_UP): vlan0: link is not ready
kasan: GPF could be caused by NULL-ptr deref or user memory access
IPv6: ADDRCONF(NETDEV_UP): vlan1: link is not ready
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 5403 Comm: syz-executor.3 Not tainted 4.14.165-syzkaller #0
IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_vlan: link becomes ready
task: ffff88809f5840c0 task.stack: ffff88802ffa8000
RIP: 0010:nfnetlink_parse_nat net/netfilter/nf_nat_core.c:747 [inline]
RIP: 0010:nfnetlink_parse_nat_setup+0x212/0x3b0
net/netfilter/nf_nat_core.c:784
RSP: 0018:ffff88802ffaf208 EFLAGS: 00010246
IPv6: ADDRCONF(NETDEV_CHANGE): veth0_vlan: link becomes ready
RAX: ffffffff854cfd10 RBX: ffff88802ffaf290 RCX: ffffc90005a5a000
device veth1_vlan entered promiscuous mode
RDX: 1ffffffff0a99fa9 RSI: ffff88802ffaf240 RDI: ffff88802ffaf290
IPv6: ADDRCONF(NETDEV_UP): macvlan0: link is not ready
RBP: ffff88802ffaf308 R08: 1ffff11005ff5e52 R09: ffff88802ffaf290
device veth0_vlan entered promiscuous mode
R10: ffffed1005ff5e57 R11: ffff88802ffaf2bf R12: ffff888034617d80
IPv6: ADDRCONF(NETDEV_CHANGE): macvlan0: link becomes ready
R13: 0000000000000000 R14: ffff88802ffaf2e0 R15: ffff88802ffaf240
FS: 00007f28caa29700(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
IPv6: ADDRCONF(NETDEV_CHANGE): vlan0: link becomes ready
CR2: 000000c43551d010 CR3: 000000007ae0d000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
IPv6: ADDRCONF(NETDEV_CHANGE): vlan1: link becomes ready
Call Trace:
IPv6: ADDRCONF(NETDEV_UP): macvlan1: link is not ready
device veth1_vlan entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): macvlan0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): macvlan1: link is not ready
ctnetlink_parse_nat_setup+0x76/0x4a0
net/netfilter/nf_conntrack_netlink.c:1421
ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1491 [inline]
ctnetlink_create_conntrack+0x468/0x10c0
net/netfilter/nf_conntrack_netlink.c:1840
ctnetlink_new_conntrack+0x4af/0xcc0
net/netfilter/nf_conntrack_netlink.c:1964
nfnetlink_rcv_msg+0xa08/0xc00 net/netfilter/nfnetlink.c:214
netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
nfnetlink_rcv+0x1ab/0x1650 net/netfilter/nfnetlink.c:515
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xb9/0x140 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2103
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45aff9
RSP: 002b:00007f28caa28c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f28caa296d4 RCX: 000000000045aff9
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000008bd R14: 00000000004c9d78 R15: 000000000075bf2c
Code: 8d 78 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02
00 0f 85 98 01 00 00 48 8b 85 10 ff ff ff 4c 89 fe 48 89 df <ff> 50 38 85
c0 0f 88 01 01 00 00 e8 be 5f 14 fc 4d 8b 76 c8 4d
RIP: nfnetlink_parse_nat net/netfilter/nf_nat_core.c:747 [inline] RSP:
ffff88802ffaf208
RIP: nfnetlink_parse_nat_setup+0x212/0x3b0 net/netfilter/nf_nat_core.c:784
RSP: ffff88802ffaf208
---[ end trace 6b3e5b64729f3da9 ]---


---
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

unread,
Jan 17, 2020, 12:44:10 PM1/17/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: c04fc6fa Linux 4.14.165
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14c188c9e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d36f53294bbc71f0
dashboard link: https://syzkaller.appspot.com/bug?extid=9b4048a361a7fb331306
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=157622d1e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=126c72d1e00000

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

audit: type=1400 audit(1579282739.943:38): avc: denied { write } for
pid=7391 comm="syz-executor257"
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tclass=netlink_netfilter_socket permissive=1
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: 7391 Comm: syz-executor257 Not tainted 4.14.165-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff8880782344c0 task.stack: ffff8880a9bb0000
RIP: 0010:nfnetlink_parse_nat net/netfilter/nf_nat_core.c:747 [inline]
RIP: 0010:nfnetlink_parse_nat_setup+0x212/0x3b0
net/netfilter/nf_nat_core.c:784
RSP: 0018:ffff8880a9bb7208 EFLAGS: 00010246
RAX: ffffffff854cfd10 RBX: ffff8880a9bb7290 RCX: 0000000000000000
RDX: 1ffffffff0a99fa9 RSI: ffff8880a9bb7240 RDI: ffff8880a9bb7290
RBP: ffff8880a9bb7308 R08: 1ffff11015376e52 R09: ffff8880a9bb7290
R10: ffffed1015376e57 R11: ffff8880a9bb72bf R12: ffff88807c629dc0
R13: 0000000000000000 R14: ffff8880a9bb72e0 R15: ffff8880a9bb7240
FS: 00000000009d0880(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bb38a011b0 CR3: 000000008f81e000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ctnetlink_parse_nat_setup+0x76/0x4a0
net/netfilter/nf_conntrack_netlink.c:1421
ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1491 [inline]
ctnetlink_create_conntrack+0x468/0x10c0
net/netfilter/nf_conntrack_netlink.c:1840
ctnetlink_new_conntrack+0x4af/0xcc0
net/netfilter/nf_conntrack_netlink.c:1964
nfnetlink_rcv_msg+0xa08/0xc00 net/netfilter/nfnetlink.c:214
netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
nfnetlink_rcv+0x1ab/0x1650 net/netfilter/nfnetlink.c:515
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xb9/0x140 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2103
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440479
RSP: 002b:00007ffe2b7a6148 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440479
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000014 R09: 00000000004002c8
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000401d00
R13: 0000000000401d90 R14: 0000000000000000 R15: 0000000000000000
Code: 8d 78 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02
00 0f 85 98 01 00 00 48 8b 85 10 ff ff ff 4c 89 fe 48 89 df <ff> 50 38 85
c0 0f 88 01 01 00 00 e8 be 5f 14 fc 4d 8b 76 c8 4d
RIP: nfnetlink_parse_nat net/netfilter/nf_nat_core.c:747 [inline] RSP:
ffff8880a9bb7208
RIP: nfnetlink_parse_nat_setup+0x212/0x3b0 net/netfilter/nf_nat_core.c:784
RSP: ffff8880a9bb7208
---[ end trace bd47beb6b9063e0a ]---

syzbot

unread,
Jan 18, 2020, 7:24:12 AM1/18/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: dc4ba5be Linux 4.19.97
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12c038d6e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=cc17a984a7e9c2f3
dashboard link: https://syzkaller.appspot.com/bug?extid=b61121f2527c6a33168b
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1410fed1e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=138248d6e00000

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

audit: type=1400 audit(1579350069.831:36): avc: denied { map } for pid=8012 comm="syz-executor856" path="/root/syz-executor856115642" 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
audit: type=1400 audit(1579350069.831:37): avc: denied { create } for pid=8012 comm="syz-executor856" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1
kasan: GPF could be caused by NULL-ptr deref or user memory access
audit: type=1400 audit(1579350069.831:38): avc: denied { write } for pid=8012 comm="syz-executor856" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8012 Comm: syz-executor856 Not tainted 4.19.97-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:nfnetlink_parse_nat net/netfilter/nf_nat_core.c:847 [inline]
RIP: 0010:nfnetlink_parse_nat_setup+0x23a/0x450 net/netfilter/nf_nat_core.c:884
Code: c3 89 c6 e8 48 4d 6d fb 85 db 0f 88 8d 01 00 00 e8 bb 4b 6d fb 49 8d 7f 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ed 01 00 00 48 8b b5 e8 fe ff ff 48 8b bd e0 fe
RSP: 0018:ffff888093ddf148 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff85fdc9f8
RDX: 0000000000000008 RSI: ffffffff85fdca05 RDI: 0000000000000041
RBP: ffff888093ddf268 R08: ffff8880952e22c0 R09: ffff888093ddf1d0
R10: ffffed10127bbe3f R11: ffff888093ddf1ff R12: ffff88809ed39ac0
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000009
FS: 0000000002515880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e574d56190 CR3: 0000000094a13000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ctnetlink_parse_nat_setup+0xc5/0x660 net/netfilter/nf_conntrack_netlink.c:1518
ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1588 [inline]
ctnetlink_create_conntrack+0x4ea/0x1300 net/netfilter/nf_conntrack_netlink.c:1981
ctnetlink_new_conntrack+0x527/0xe50 net/netfilter/nf_conntrack_netlink.c:2111
nfnetlink_rcv_msg+0xd0d/0xfcf net/netfilter/nfnetlink.c:228
netlink_rcv_skb+0x17d/0x460 net/netlink/af_netlink.c:2454
nfnetlink_rcv+0x1c0/0x460 net/netfilter/nfnetlink.c:560
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x53a/0x730 net/netlink/af_netlink.c:1343
netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xd7/0x130 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0x105/0x1d0 net/socket.c:2153
__do_sys_sendmsg net/socket.c:2162 [inline]
__se_sys_sendmsg net/socket.c:2160 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2160
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440479
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:00007fffceb5f9c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440479
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000014 R09: 00000000004002c8
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000401d00
R13: 0000000000401d90 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 87dc14b51052f72a ]---
RIP: 0010:nfnetlink_parse_nat net/netfilter/nf_nat_core.c:847 [inline]
RIP: 0010:nfnetlink_parse_nat_setup+0x23a/0x450 net/netfilter/nf_nat_core.c:884
Code: c3 89 c6 e8 48 4d 6d fb 85 db 0f 88 8d 01 00 00 e8 bb 4b 6d fb 49 8d 7f 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ed 01 00 00 48 8b b5 e8 fe ff ff 48 8b bd e0 fe
RSP: 0018:ffff888093ddf148 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff85fdc9f8
RDX: 0000000000000008 RSI: ffffffff85fdca05 RDI: 0000000000000041
RBP: ffff888093ddf268 R08: ffff8880952e22c0 R09: ffff888093ddf1d0
R10: ffffed10127bbe3f R11: ffff888093ddf1ff R12: ffff88809ed39ac0
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000009
FS: 0000000002515880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e574d56190 CR3: 0000000094a13000 CR4: 00000000001406f0
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
Reply all
Reply to author
Forward
0 new messages