syzbot


general protection fault in nft_tunnel_get_init

Status: fixed on 2020/02/16 09:59
Reported-by: syzbot+76e57ca2161242374c0e@syzkaller.appspotmail.com
Fix commit: 6de941ce70cd netfilter: nft_tunnel: fix null-attribute check
First crash: 1555d, last: 1555d
Fix bisection: fixed by (bisect log) :
commit 6de941ce70cd5c6d672f8af2d0a6dc83039a283c
Author: Florian Westphal <fw@strlen.de>
Date: Thu Jan 16 07:44:11 2020 +0000

  netfilter: nft_tunnel: fix null-attribute check

  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in nft_tunnel_get_init netfilter C done 7 1555d 1555d 15/26 fixed on 2020/02/18 14:31

Sample crash report:
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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/16 02:44 linux-4.19.y db5b9190ff82 f9b69507 .config console log report syz C ci2-linux-4-19
* Struck through repros no longer work on HEAD.