syzbot


general protection fault in skb_unlink

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+278279efdd2730dd14bf@syzkaller.appspotmail.com
Fix commit: 5121197ecc5d kcm: close race conditions on sk_receive_queue
First crash: 2379d, last: 817d
Cause bisection: introduced by (bisect log) [merge commit]:
commit b45efa30a626e915192a6c548cd8642379cd47cc
Author: David S. Miller <davem@davemloft.net>
Date: Tue Feb 2 02:44:07 2016 +0000

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Crash: BUG: spinlock lockup suspected in nf_conntrack_lock (log)
Repro: C syz .config
  
Fix bisection: failed (error log, bisect log)
  
Discussions (7)
Title Replies (including bot) Last reply
Re: use-after-free warnings in tcp_v4_connect() due to inet_twsk_hashdance() inserting the object into ehash table without initializing its reference counter 1 (1) 2024/05/01 11:30
[Patch net v3] kcm: close race conditions on sk_receive_queue 2 (2) 2022/11/15 12:00
[Patch net v2] kcm: close race conditions on sk_receive_queue 3 (3) 2022/11/13 21:29
Reminder: 3 open syzbot bugs in "net/kcm" subsystem 1 (1) 2019/07/24 02:39
[PATCH net] kcm: fix races on sk_receive_queue 5 (5) 2018/06/08 16:25
[RFC PATCH] kcm: hold rx mux lock when updating the receive queue. 2 (2) 2018/06/05 14:53
general protection fault in skb_unlink 0 (1) 2018/05/31 08:16
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in skb_unlink C done error 2 1656d 1836d 0/1 upstream: reported C repro on 2019/11/24 07:04
linux-4.19 general protection fault in skb_unlink C done error 1 1169d 1836d 0/1 upstream: reported C repro on 2019/11/24 09:40
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/09/08 07:27 10m retest repro upstream report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/01/07 14:59 13m bisect fix upstream error job log
2019/08/11 19:27 23m bisect fix upstream OK (0) job log log

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: 8807 Comm: syz-executor392 Not tainted 5.4.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__write_once_size include/linux/compiler.h:226 [inline]
RIP: 0010:__skb_unlink include/linux/skbuff.h:2024 [inline]
RIP: 0010:skb_unlink+0xc4/0x160 net/core/skbuff.c:3165
Code: 00 00 49 8d 7d 08 4c 8b 63 08 48 b8 00 00 00 00 00 fc ff df 48 c7 43 08 00 00 00 00 48 89 fa 48 c7 03 00 00 00 00 48 c1 ea 03 <80> 3c 02 00 75 58 4c 89 e2 4d 89 65 08 48 b8 00 00 00 00 00 fc ff
RSP: 0018:ffff8880a0e87908 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: ffff88809fcc9540 RCX: ffffffff815a6e2a
RDX: 0000000000000001 RSI: 0000000000000282 RDI: 0000000000000008
RBP: ffff8880a0e87930 R08: 0000000000000004 R09: ffffed10141d0f0e
R10: ffffed10141d0f0d R11: 0000000000000003 R12: 0000000000000000
R13: 0000000000000000 R14: ffff888099424828 R15: ffff8880a0e879d8
FS:  00007f803503f700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000209ff000 CR3: 0000000092347000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kcm_recvmsg+0x462/0x560 net/kcm/kcmsock.c:1161
 sock_recvmsg_nosec+0x89/0xb0 net/socket.c:871
 ___sys_recvmsg+0x271/0x5c0 net/socket.c:2480
 do_recvmmsg+0x27e/0x7a0 net/socket.c:2601
 __sys_recvmmsg+0x259/0x270 net/socket.c:2680
 __do_sys_recvmmsg net/socket.c:2703 [inline]
 __se_sys_recvmmsg net/socket.c:2696 [inline]
 __x64_sys_recvmmsg+0xe6/0x140 net/socket.c:2696
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446a39
Code: e8 5c b3 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 0b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f803503ed98 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00000000006dbc48 RCX: 0000000000446a39
RDX: 0400000000000310 RSI: 0000000020003540 RDI: 0000000000000005
RBP: 00000000006dbc40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc4c
R13: 00000000002b0095 R14: 0000a50000000000 R15: 0000000300000018
Modules linked in:
---[ end trace eb72d066863fd158 ]---
RIP: 0010:__write_once_size include/linux/compiler.h:226 [inline]
RIP: 0010:__skb_unlink include/linux/skbuff.h:2024 [inline]
RIP: 0010:skb_unlink+0xc4/0x160 net/core/skbuff.c:3165
Code: 00 00 49 8d 7d 08 4c 8b 63 08 48 b8 00 00 00 00 00 fc ff df 48 c7 43 08 00 00 00 00 48 89 fa 48 c7 03 00 00 00 00 48 c1 ea 03 <80> 3c 02 00 75 58 4c 89 e2 4d 89 65 08 48 b8 00 00 00 00 00 fc ff
RSP: 0018:ffff8880a0e87908 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: ffff88809fcc9540 RCX: ffffffff815a6e2a
RDX: 0000000000000001 RSI: 0000000000000282 RDI: 0000000000000008
RBP: ffff8880a0e87930 R08: 0000000000000004 R09: ffffed10141d0f0e
R10: ffffed10141d0f0d R11: 0000000000000003 R12: 0000000000000000
R13: 0000000000000000 R14: ffff888099424828 R15: ffff8880a0e879d8
FS:  00007f803503f700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000209ff000 CR3: 0000000092347000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/24 11:36 upstream 6b8a79467876 598ca6c8 .config console log report syz C ci-upstream-kasan-gce-root
2019/11/24 10:29 upstream 6b8a79467876 598ca6c8 .config console log report syz C ci-upstream-kasan-gce-smack-root
2019/11/24 08:45 upstream 6b8a79467876 598ca6c8 .config console log report syz C ci-upstream-kasan-gce
2019/11/24 08:41 upstream 6b8a79467876 598ca6c8 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/05/30 17:06 upstream 0044cdeb7313 2f93b54f .config console log report syz C ci-upstream-kasan-gce
2019/12/08 06:28 linux-next 558c2bf52f61 1508f453 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/01/22 12:35 net-old 49a57857aeea 985f75cc .config console log report ci-upstream-net-this-kasan-gce
2018/12/02 21:27 net-next-old 97e6c858a26e e0d8c853 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.