general protection fault in nft_tunnel_get_init

4 views
Skip to first unread message

syzbot

unread,
Jan 15, 2020, 9:45:11 PM1/15/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: db5b9190 Linux 4.19.96
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=149681aee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=7a24894346f71303
dashboard link: https://syzkaller.appspot.com/bug?extid=76e57ca2161242374c0e
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1023533ee00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16655d8ee00000

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

audit: type=1400 audit(1579142466.070:36): avc: denied { map } for
pid=8314 comm="syz-executor203" path="/root/syz-executor203074776"
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(1579142466.070:37): avc: denied { create } for
pid=8314 comm="syz-executor203"
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
audit: type=1400 audit(1579142466.070:38): avc: denied { write } for
pid=8314 comm="syz-executor203"
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
CPU: 1 PID: 8314 Comm: syz-executor203 Not tainted 4.19.96-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:nla_get_be32 include/net/netlink.h:1082 [inline]
RIP: 0010:nft_tunnel_get_init+0x67/0x200 net/netfilter/nft_tunnel.c:63
Code: 00 00 49 8b 5c 24 08 48 85 db 0f 84 2c 01 00 00 e8 ce fa 64 fb 48 8d
7b 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48
89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 42
RSP: 0018:ffff8880972ff448 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86016730
RDX: 0000000000000000 RSI: ffffffff86061af2 RDI: 0000000000000004
RBP: ffff8880972ff478 R08: ffff888095a96500 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: ffff8880961f0bc8
R13: ffff88808c405418 R14: ffff8880972ff548 R15: 0000000000000000
FS: 0000000002477880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cfd5fb91b0 CR3: 0000000088ada000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
nf_tables_newexpr net/netfilter/nf_tables_api.c:2114 [inline]
nf_tables_newrule+0xd90/0x2140 net/netfilter/nf_tables_api.c:2678
nfnetlink_rcv_batch+0xef6/0x1750 net/netfilter/nfnetlink.c:430
nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:540 [inline]
nfnetlink_rcv+0x3ed/0x460 net/netfilter/nfnetlink.c:558
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:0x4407b9
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:00007ffd2d136548 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004407b9
RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000001 R09: 00000000004002c8
R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000402040
R13: 00000000004020d0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 5b6cf3ed4c82f7b9 ]---
RIP: 0010:nla_get_be32 include/net/netlink.h:1082 [inline]
RIP: 0010:nft_tunnel_get_init+0x67/0x200 net/netfilter/nft_tunnel.c:63
Code: 00 00 49 8b 5c 24 08 48 85 db 0f 84 2c 01 00 00 e8 ce fa 64 fb 48 8d
7b 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48
89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 42
RSP: 0018:ffff8880972ff448 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86016730
RDX: 0000000000000000 RSI: ffffffff86061af2 RDI: 0000000000000004
RBP: ffff8880972ff478 R08: ffff888095a96500 R09: ffffed1015d04733
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: ffff8880961f0bc8
R13: ffff88808c405418 R14: ffff8880972ff548 R15: 0000000000000000
FS: 0000000002477880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cfd5fb91b0 CR3: 0000000088ada000 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 15, 2020, 1:15:03 AM2/15/20
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 6de941ce70cd5c6d672f8af2d0a6dc83039a283c
Author: Florian Westphal <f...@strlen.de>
Date: Thu Jan 16 07:44:11 2020 +0000

netfilter: nft_tunnel: fix null-attribute check

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16de3f01e00000
start commit: db5b9190 Linux 4.19.96
git tree: linux-4.19.y
If the result looks correct, please mark the bug fixed by replying with:

#syz fix: netfilter: nft_tunnel: fix null-attribute check

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