syzbot


general protection fault in get_unique_tuple

Status: fixed on 2020/11/05 11:24
Reported-by: syzbot+ea457f8ee3588ebd4fd0@syzkaller.appspotmail.com
Fix commit: 289fe546ea16 netfilter: ctnetlink: add a range check for l3/l4 protonum
First crash: 1550d, last: 1289d
Fix bisection: fixed by (bisect log) :
commit 289fe546ea16c2dcb57c5198c5a7b7387604530e
Author: Will McVicker <willmcvicker@google.com>
Date: Mon Aug 24 19:38:32 2020 +0000

  netfilter: ctnetlink: add a range check for l3/l4 protonum

  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in get_unique_tuple C inconclusive 22 1416d 1548d 0/1 upstream: reported C repro on 2020/01/20 00:16
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2020/11/04 09:59 2h54m bisect fix linux-4.19.y job log (1)
2020/10/05 09:32 26m bisect fix linux-4.19.y job log (0) log
2020/09/05 06:26 28m bisect fix linux-4.19.y job log (0) log
2020/08/06 02:57 26m bisect fix linux-4.19.y job log (0) log
2020/07/07 02:21 23m bisect fix linux-4.19.y job log (0) log
2020/05/14 10:59 26m bisect fix linux-4.19.y job log (0) log

Sample crash report:
audit: type=1400 audit(1590473886.289:8): avc:  denied  { execmem } for  pid=6427 comm="syz-executor029" 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
CPU: 0 PID: 6427 Comm: syz-executor029 Not tainted 4.19.124-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:__nf_nat_l4proto_find net/netfilter/nf_nat_core.c:73 [inline]
RIP: 0010:get_unique_tuple+0x27a/0x1d50 net/netfilter/nf_nat_core.c:336
Code: c1 e9 03 80 3c 11 00 0f 85 d1 17 00 00 4a 8b 14 e5 20 18 8e 89 4c 8d 24 c2 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f 85 9d 17 00 00 49 8b 04 24 48 89 85 08 ff ff ff e8
RSP: 0018:ffff88808fcfee10 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88808fcfefb8 RCX: 1ffffffff131c359
RDX: 0000000000000000 RSI: ffffffff85d1fe87 RDI: ffffffff898e1ac8
RBP: ffff88808fcfef68 R08: ffff8880a559e2c0 R09: ffffed1015cc473b
R10: ffffed1015cc473a R11: ffff8880ae6239d3 R12: 0000000000000000
R13: 0000000000000001 R14: ffff88808fcff008 R15: ffff8880a1256dc0
FS:  00000000007e2880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000280 CR3: 00000000a9152000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 nf_nat_setup_info+0x1c3/0x850 net/netfilter/nf_nat_core.c:431
 __nf_nat_alloc_null_binding+0x164/0x1d0 net/netfilter/nf_nat_core.c:490
 nfnetlink_parse_nat_setup+0x39a/0x420 net/netfilter/nf_nat_core.c:882
 ctnetlink_parse_nat_setup+0xb6/0x640 net/netfilter/nf_conntrack_netlink.c:1521
 ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1591 [inline]
 ctnetlink_create_conntrack+0x4b7/0x12b0 net/netfilter/nf_conntrack_netlink.c:1984
 ctnetlink_new_conntrack+0x4f5/0xdd1 net/netfilter/nf_conntrack_netlink.c:2114
 nfnetlink_rcv_msg+0xc6b/0xf50 net/netfilter/nfnetlink.c:228
 netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455
 nfnetlink_rcv+0x1b2/0x420 net/netfilter/nfnetlink.c:560
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x6e3/0xcc0 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:632
 ___sys_sendmsg+0x803/0x920 net/socket.c:2115
 __sys_sendmsg+0xec/0x1b0 net/socket.c:2153
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440299
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:00007fffc8cfc458 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440299
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b20
R13: 0000000000401bb0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace e06113b727aed1eb ]---
RIP: 0010:__read_once_size include/linux/compiler.h:193 [inline]
RIP: 0010:__nf_nat_l4proto_find net/netfilter/nf_nat_core.c:73 [inline]
RIP: 0010:get_unique_tuple+0x27a/0x1d50 net/netfilter/nf_nat_core.c:336
Code: c1 e9 03 80 3c 11 00 0f 85 d1 17 00 00 4a 8b 14 e5 20 18 8e 89 4c 8d 24 c2 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f 85 9d 17 00 00 49 8b 04 24 48 89 85 08 ff ff ff e8
RSP: 0018:ffff88808fcfee10 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88808fcfefb8 RCX: 1ffffffff131c359
RDX: 0000000000000000 RSI: ffffffff85d1fe87 RDI: ffffffff898e1ac8
RBP: ffff88808fcfef68 R08: ffff8880a559e2c0 R09: ffffed1015cc473b
R10: ffffed1015cc473a R11: ffff8880ae6239d3 R12: 0000000000000000
R13: 0000000000000001 R14: ffff88808fcff008 R15: ffff8880a1256dc0
FS:  00000000007e2880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000280 CR3: 00000000a9152000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/26 06:19 linux-4.19.y 1bab61d3e8cd 8ca3b7d2 .config console log report syz C ci2-linux-4-19
2020/04/14 10:55 linux-4.19.y 6dd0e32665e5 7c54686a .config console log report syz C ci2-linux-4-19
2020/04/13 09:17 linux-4.19.y dda0e2920330 17a986e5 .config console log report syz C ci2-linux-4-19
2020/04/10 09:01 linux-4.19.y dda0e2920330 a8c6a3f8 .config console log report syz C ci2-linux-4-19
2020/04/03 13:37 linux-4.19.y dda0e2920330 5ed396e6 .config console log report syz C ci2-linux-4-19
2020/01/31 01:07 linux-4.19.y 7cdefde351b6 5ed23f9a .config console log report syz C ci2-linux-4-19
2020/01/19 14:55 linux-4.19.y dc4ba5be1bab bc8bc756 .config console log report syz C ci2-linux-4-19
2020/01/17 19:54 linux-4.19.y db5b9190ff82 3de7aabb .config console log report syz C ci2-linux-4-19
2020/06/07 02:04 linux-4.19.y 4707d8e57273 e6b89e4e .config console log report ci2-linux-4-19
2020/06/07 01:57 linux-4.19.y 4707d8e57273 e6b89e4e .config console log report ci2-linux-4-19
2020/06/05 20:36 linux-4.19.y 4707d8e57273 d36418e9 .config console log report ci2-linux-4-19
2020/05/20 18:19 linux-4.19.y 1bab61d3e8cd 4afdfa20 .config console log report ci2-linux-4-19
2020/05/16 07:28 linux-4.19.y 258f0cf7ac3b 37bccd4e .config console log report ci2-linux-4-19
2020/05/16 07:20 linux-4.19.y 258f0cf7ac3b 37bccd4e .config console log report ci2-linux-4-19
2020/05/14 12:35 linux-4.19.y 258f0cf7ac3b 2d572622 .config console log report ci2-linux-4-19
2020/05/14 11:16 linux-4.19.y 258f0cf7ac3b 2d572622 .config console log report ci2-linux-4-19
2020/04/09 13:28 linux-4.19.y dda0e2920330 a8c6a3f8 .config console log report ci2-linux-4-19
2020/04/08 19:02 linux-4.19.y dda0e2920330 db9bcd4b .config console log report ci2-linux-4-19
2020/03/21 04:24 linux-4.19.y 14cfdbd39e31 2c31c529 .config console log report ci2-linux-4-19
2020/03/14 18:09 linux-4.19.y 569209711609 749688d2 .config console log report ci2-linux-4-19
2020/03/14 15:06 linux-4.19.y 569209711609 749688d2 .config console log report ci2-linux-4-19
2020/03/10 12:32 linux-4.19.y 7472c4028e23 35f53e45 .config console log report ci2-linux-4-19
2020/03/02 14:16 linux-4.19.y a083db76118d 4a4e0509 .config console log report ci2-linux-4-19
2020/02/26 12:35 linux-4.19.y f25804f38984 4f588111 .config console log report ci2-linux-4-19
2020/02/14 11:50 linux-4.19.y 357668399cf7 5d7b90f1 .config console log report ci2-linux-4-19
2020/02/10 12:32 linux-4.19.y b499cf4b3a90 35f5e45e .config console log report ci2-linux-4-19
2020/01/29 17:43 linux-4.19.y 7cdefde351b6 5ed23f9a .config console log report ci2-linux-4-19
2020/01/26 00:56 linux-4.19.y d183c8e2647a f4e7270e .config console log report ci2-linux-4-19
2020/01/24 21:27 linux-4.19.y d183c8e2647a 2e95ab33 .config console log report ci2-linux-4-19
2020/01/24 02:15 linux-4.19.y d183c8e2647a 11ebf937 .config console log report ci2-linux-4-19
2020/01/18 02:57 linux-4.19.y dc4ba5be1bab 3de7aabb .config console log report ci2-linux-4-19
2020/01/17 19:43 linux-4.19.y db5b9190ff82 3de7aabb .config console log report ci2-linux-4-19
2020/01/17 19:36 linux-4.19.y db5b9190ff82 3de7aabb .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.