syzbot


general protection fault in ip6_sublist_rcv

Status: fixed on 2019/12/13 00:31
Reported-by: syzbot+c54f457cad330e57e967@syzkaller.appspotmail.com
Fix commit: 51210ad5a558 inet: do not call sublist_rcv on empty list
First crash: 1071d, last: 1061d

Cause bisection: introduced by (bisect log) :
commit ca58fbe06c54795f00db79e447f94c2028d30124
Author: Florian Westphal <fw@strlen.de>
Date: Thu Oct 10 22:30:37 2019 +0000

  netfilter: add and use nf_hook_slow_list()

Crash: general protection fault in ip6_sublist_rcv (log)
Repro: C syz .config

Sample crash report:
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: 1 PID: 9027 Comm: syz-executor906 Not tainted 5.4.0-rc4-next-20191024 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline]
RIP: 0010:NF_HOOK_LIST include/linux/netfilter.h:331 [inline]
RIP: 0010:ip6_sublist_rcv+0x5c9/0x930 net/ipv6/ip6_input.c:292
Code: 0f 85 73 01 00 00 e8 06 63 24 fb 48 8b 85 00 ff ff ff 48 8d b8 10 0f 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 44 03 00 00 48 8b 85 00 ff ff ff 4c 8b a0 10 0f
RSP: 0018:ffff8880956af3c0 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff864f0e0e
RDX: 00000000000001e2 RSI: ffffffff864f0c6a RDI: 0000000000000f10
RBP: ffff8880956af4f0 R08: ffff8880a1778040 R09: ffffed1015d26b7d
R10: ffffed1015d26b7c R11: ffff8880ae935be3 R12: 0000000000000001
R13: ffff8880956af4c8 R14: ffff8880956af558 R15: ffff8880956af680
FS:  0000000000819880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000780 CR3: 0000000089dec000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ipv6_list_rcv+0x373/0x4b0 net/ipv6/ip6_input.c:328
 __netif_receive_skb_list_ptype net/core/dev.c:5274 [inline]
 __netif_receive_skb_list_core+0x5fc/0x9d0 net/core/dev.c:5322
 __netif_receive_skb_list net/core/dev.c:5374 [inline]
 netif_receive_skb_list_internal+0x7eb/0xe50 net/core/dev.c:5469
 gro_normal_list.part.0+0x1e/0xb0 net/core/dev.c:5892
 gro_normal_list net/core/dev.c:5905 [inline]
 gro_normal_one+0x184/0x1d0 net/core/dev.c:5904
 napi_frags_finish net/core/dev.c:6008 [inline]
 napi_gro_frags+0x915/0xd00 net/core/dev.c:6081
 tun_get_user+0x2e8e/0x3f80 drivers/net/tun.c:1976
 tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:2022
 call_write_iter include/linux/fs.h:1902 [inline]
 do_iter_readv_writev+0x5f8/0x8f0 fs/read_write.c:693
 do_iter_write fs/read_write.c:970 [inline]
 do_iter_write+0x184/0x610 fs/read_write.c:951
 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1015
 do_writev+0x15b/0x330 fs/read_write.c:1058
 __do_sys_writev fs/read_write.c:1131 [inline]
 __se_sys_writev fs/read_write.c:1128 [inline]
 __x64_sys_writev+0x75/0xb0 fs/read_write.c:1128
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441d80
Code: 05 48 3d 01 f0 ff ff 0f 83 5d 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 83 3d 91 92 29 00 00 75 14 b8 14 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 34 09 fc ff c3 48 83 ec 08 e8 ba 2b 00 00
RSP: 002b:00007ffc73f8e2e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007ffc73f8e300 RCX: 0000000000441d80
RDX: 0000000000000001 RSI: 00007ffc73f8e330 RDI: 00000000000000f0
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000004
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000012dae
R13: 0000000000402bd0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace b92638c9e1a03392 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline]
RIP: 0010:NF_HOOK_LIST include/linux/netfilter.h:331 [inline]
RIP: 0010:ip6_sublist_rcv+0x5c9/0x930 net/ipv6/ip6_input.c:292
Code: 0f 85 73 01 00 00 e8 06 63 24 fb 48 8b 85 00 ff ff ff 48 8d b8 10 0f 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 44 03 00 00 48 8b 85 00 ff ff ff 4c 8b a0 10 0f
RSP: 0018:ffff8880956af3c0 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff864f0e0e
RDX: 00000000000001e2 RSI: ffffffff864f0c6a RDI: 0000000000000f10
RBP: ffff8880956af4f0 R08: ffff8880a1778040 R09: ffffed1015d26b7d
R10: ffffed1015d26b7c R11: ffff8880ae935be3 R12: 0000000000000001
R13: ffff8880956af4c8 R14: ffff8880956af558 R15: ffff8880956af680
FS:  0000000000819880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000780 CR3: 0000000089dec000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (327):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2019/10/24 22:21 linux-next 12d61c699699 d01bb02a .config log report syz C
ci-upstream-net-kasan-gce 2019/10/30 07:38 net-next 92d72f1b8bbb 5ea87a66 .config log report
ci-upstream-bpf-next-kasan-gce 2019/10/30 05:46 bpf-next a566e35f1e8b 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/30 03:21 net-next 92d72f1b8bbb 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/30 01:36 net-next 92d72f1b8bbb 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/30 00:11 net-next 92d72f1b8bbb 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 21:02 net-next 92d72f1b8bbb 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 19:35 net-next 92d72f1b8bbb 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 18:26 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 18:25 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 17:04 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 15:54 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 13:00 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 10:34 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 09:31 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 09:05 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 07:26 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/29 06:15 net-next d5a721c96a44 5ea87a66 .config log report
ci-upstream-net-kasan-gce 2019/10/28 23:05 net-next f0d532c43073 439d7b14 .config log report
ci-upstream-net-kasan-gce 2019/10/28 21:33 net-next f0d532c43073 439d7b14 .config log report
ci-upstream-net-kasan-gce 2019/10/28 20:32 net-next 5b7fe93db008 439d7b14 .config log report
ci-upstream-net-kasan-gce 2019/10/28 17:49 net-next 5b7fe93db008 439d7b14 .config log report
ci-upstream-net-kasan-gce 2019/10/28 17:02 net-next 5b7fe93db008 439d7b14 .config log report
ci-upstream-net-kasan-gce 2019/10/28 15:57 net-next 5b7fe93db008 25bb509e .config log report
ci-upstream-net-kasan-gce 2019/10/28 14:38 net-next 5b7fe93db008 25bb509e .config log report
ci-upstream-net-kasan-gce 2019/10/28 12:13 net-next 5b7fe93db008 25bb509e .config log report
ci-upstream-net-kasan-gce 2019/10/28 10:00 net-next 5b7fe93db008 25bb509e .config log report
ci-upstream-net-kasan-gce 2019/10/28 08:21 net-next 5b7fe93db008 25bb509e .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/31 06:37 linux-next fdbc6c104f95 a41ca8fa .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/31 05:13 linux-next fdbc6c104f95 a41ca8fa .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/31 03:46 linux-next fdbc6c104f95 a41ca8fa .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/31 02:43 linux-next fdbc6c104f95 a41ca8fa .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/31 00:35 linux-next fdbc6c104f95 a41ca8fa .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 20:02 linux-next fdbc6c104f95 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 18:48 linux-next fdbc6c104f95 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 14:29 linux-next fdbc6c104f95 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 12:41 linux-next fdbc6c104f95 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 12:36 linux-next fdbc6c104f95 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 09:30 linux-next fdbc6c104f95 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/30 00:15 linux-next c57cf3833c66 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/29 22:06 linux-next c57cf3833c66 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/29 11:58 linux-next c57cf3833c66 5ea87a66 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/29 03:51 linux-next 60c1769a45f4 439d7b14 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/28 23:43 linux-next 60c1769a45f4 439d7b14 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/28 13:33 linux-next 60c1769a45f4 25bb509e .config log report
ci-upstream-linux-next-kasan-gce-root 2019/10/21 13:17 linux-next a6fcdcd94927 b24d2b8a .config log report
* Struck through repros no longer work on HEAD.