syzbot


WARNING: refcount bug in sk_alloc (2)

Status: upstream: reported syz repro on 2020/03/10 22:25
Reported-by: syzbot+b1212b1215db82ff9211@syzkaller.appspotmail.com
First crash: 1006d, last: 531d

Cause bisection: introduced by (bisect log) :
commit b78e9d63a3b6307b6b786e6ba189d3978b60ceb5
Author: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Date: Thu Jan 9 12:33:40 2020 +0000

  MIPS: SGI-IP27: use asm/sn/agent.h for including HUB related stuff

Crash: WARNING: refcount bug in sk_alloc (log)
Repro: syz .config

Fix bisection: failed (bisect log)
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in sk_alloc 46 1619d 1639d 0/24 auto-closed as invalid on 2019/02/22 10:22
Patch testing requests:
Created Duration User Patch Repo Result
2022/09/22 02:29 17m upstream OK log
2022/09/13 03:27 16m net-next OK log
2022/09/13 00:27 15m net-next OK log
2022/09/12 20:27 16m net-next OK log
2022/09/12 15:27 16m net OK log
2022/09/12 11:27 15m net OK log
2022/09/12 07:27 16m net OK log

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 10222 at lib/refcount.c:25 refcount_warn_saturate+0x169/0x1e0 lib/refcount.c:25
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 10222 Comm: syz-executor.5 Not tainted 5.6.0-rc3-next-20200228-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x35 kernel/panic.c:582
 report_bug+0x27b/0x2f0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:175 [inline]
 fixup_bug arch/x86/kernel/traps.c:170 [inline]
 do_error_trap+0x12b/0x220 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:refcount_warn_saturate+0x169/0x1e0 lib/refcount.c:25
Code: 06 31 ff 89 de e8 b7 c7 e2 fd 84 db 0f 85 36 ff ff ff e8 7a c6 e2 fd 48 c7 c7 e0 da 71 88 c6 05 1f aa f1 06 01 e8 df 91 b4 fd <0f> 0b e9 17 ff ff ff e8 5b c6 e2 fd 0f b6 1d 04 aa f1 06 31 ff 89
RSP: 0018:ffffc90003b2fd20 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815c4e91 RDI: fffff52000765f96
RBP: 0000000000000002 R08: ffff88807b25c400 R09: ffffed1015cc6661
R10: ffffed1015cc6660 R11: ffff8880ae633307 R12: ffff8880a2626000
R13: ffff88809ace2104 R14: 0000000000000010 R15: ffff8880a26260c8
 refcount_add include/linux/refcount.h:191 [inline]
 refcount_inc include/linux/refcount.h:228 [inline]
 get_net include/net/net_namespace.h:241 [inline]
 sk_alloc+0xe86/0xfa0 net/core/sock.c:1670
 __netlink_create+0x63/0x280 net/netlink/af_netlink.c:629
 netlink_create+0x3a1/0x5d0 net/netlink/af_netlink.c:692
 __sock_create+0x3cb/0x730 net/socket.c:1433
 sock_create net/socket.c:1484 [inline]
 __sys_socket+0xef/0x200 net/socket.c:1526
 __do_sys_socket net/socket.c:1535 [inline]
 __se_sys_socket net/socket.c:1533 [inline]
 __x64_sys_socket+0x6f/0xb0 net/socket.c:1533
 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c849
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f4b8bdbfc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000029
RAX: ffffffffffffffda RBX: 00007f4b8bdc06d4 RCX: 000000000045c849
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000010
RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000b8b R14: 00000000004cdbcf R15: 000000000076bf0c
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (31):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2020/03/15 16:53 linux-next 770fbb32d34e 749688d2 .config log report syz
ci-upstream-net-this-kasan-gce 2021/04/13 01:03 net 6628ddfec758 bfeda1b1 .config log report syz WARNING: refcount bug in sk_alloc
ci-upstream-net-kasan-gce 2021/04/13 03:09 net-next c82eaa4064f3 bfeda1b1 .config log report syz WARNING: refcount bug in sk_alloc
ci-upstream-kasan-gce-smack-root 2020/04/02 18:56 upstream 919dce24701f a34e2c33 .config log report syz
ci-upstream-net-this-kasan-gce 2020/03/15 12:08 net 0d1c3530e1bd 749688d2 .config log report syz
ci-upstream-net-this-kasan-gce 2020/02/27 06:42 net 6132c1d9033d 59b57593 .config log report syz
ci-upstream-net-kasan-gce 2020/03/15 00:14 net-next 94229d45239b 749688d2 .config log report syz
ci-upstream-net-kasan-gce 2020/02/27 05:44 net-next c3e042f54107 59b57593 .config log report syz
ci-upstream-net-this-kasan-gce 2021/04/10 22:11 net 4e04e7513b0f bfeda1b1 .config log report info WARNING: refcount bug in sk_alloc
ci-upstream-linux-next-kasan-gce-root 2021/04/10 22:15 linux-next e99d8a849517 bfeda1b1 .config log report info WARNING: refcount bug in sk_alloc
ci-upstream-kasan-gce-smack-root 2020/03/08 04:43 upstream 61a09258f2e5 2e9971bb .config log report
ci-upstream-kasan-gce 2020/03/07 22:19 upstream 63849c8f4107 2e9971bb .config log report
ci-upstream-kasan-gce-smack-root 2020/03/07 21:38 upstream 63849c8f4107 2e9971bb .config log report
ci-upstream-kasan-gce 2020/03/07 18:43 upstream 63849c8f4107 2e9971bb .config log report
ci-upstream-kasan-gce-smack-root 2020/03/07 01:38 upstream fb279f4e2386 fd2a5f28 .config log report
ci-upstream-kasan-gce-smack-root 2020/03/04 18:24 upstream 63623fd44972 c88c7b75 .config log report
ci-upstream-kasan-gce-smack-root 2020/03/04 04:08 upstream 63623fd44972 c88c7b75 .config log report
ci-upstream-kasan-gce-smack-root 2020/02/27 03:44 upstream f8788d86ab28 59b57593 .config log report
ci-upstream-kasan-gce-smack-root 2020/02/24 18:00 upstream f8788d86ab28 59b57593 .config log report
ci-upstream-kasan-gce 2020/02/21 12:37 upstream ca7e1fd1026c bd2a74a3 .config log report
ci-upstream-kasan-gce-root 2020/02/19 16:22 upstream 0a44cac81050 b690a6e3 .config log report
ci-upstream-kasan-gce-root 2020/02/19 14:30 upstream 0a44cac81050 135c18aa .config log report
ci-upstream-kasan-gce-selinux-root 2020/02/19 14:25 upstream 0a44cac81050 135c18aa .config log report
ci-upstream-kasan-gce-386 2020/03/07 22:08 upstream 63849c8f4107 2e9971bb .config log report
ci-upstream-kasan-gce-386 2020/02/19 14:15 upstream 0a44cac81050 135c18aa .config log report
ci-upstream-net-this-kasan-gce 2020/03/07 22:02 net aeaa925bff84 2e9971bb .config log report
ci-upstream-net-kasan-gce 2020/03/14 14:01 net-next 1d3435793123 749688d2 .config log report
ci-upstream-net-kasan-gce 2020/02/19 14:14 net-next 00796b929ce8 135c18aa .config log report
ci-upstream-net-kasan-gce 2020/01/23 16:29 net-next fd786fb1d2ca 3334d684 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/01/11 17:40 linux-next 6c09d7dbb7d3 4c04afaa .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/24 12:36 linux-next 7ddd09fc4b74 be5c2c81 .config log report
* Struck through repros no longer work on HEAD.