syzbot


WARNING: refcount bug in free_nsproxy (2)

Status: upstream: reported C repro on 2020/01/14 22:04
Reported-by: syzbot+a98eee31f5df4261d88c@syzkaller.appspotmail.com
First crash: 1117d, last: 997d

Cause bisection: introduced by (bisect log) :
commit 14215108a1fd7e002c0a1f9faf8fbaf41fdda50d
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date: Thu Feb 21 05:37:42 2019 +0000

  net_sched: initialize net pointer inside tcf_exts_init()

Crash: KASAN: use-after-free Read in cleanup_net (log)
Repro: C 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 free_nsproxy 4 1770d 1794d 6/24 fixed on 2018/05/08 18:30
Last patch testing requests:
Created Duration User Patch Repo Result
2022/12/26 18:31 20m retest repro upstream OK log
2022/12/23 23:31 7m retest repro linux-next error
2022/12/23 21:31 19m retest repro linux-next OK log
2022/12/23 17:31 20m retest repro linux-next OK log
2022/12/23 15:31 20m retest repro linux-next OK log
2022/12/23 08:31 20m retest repro linux-next OK log
2022/12/23 06:31 20m retest repro linux-next OK log
2022/12/23 05:31 20m retest repro linux-next OK log
2022/12/23 03:31 20m retest repro linux-next OK log
2022/12/18 16:31 20m retest repro upstream OK log
2020/09/11 09:33 9m anant.thazhemadam@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
netlink: 16 bytes leftover after parsing attributes in process `syz-executor388'.
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 9470 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 9470 Comm: syz-executor388 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+0x1d1/0x1e0 lib/refcount.c:28
Code: e9 db fe ff ff 48 89 df e8 1c e7 1f fe e9 8a fe ff ff e8 12 c6 e2 fd 48 c7 c7 40 db 71 88 c6 05 b6 a9 f1 06 01 e8 77 91 b4 fd <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
RSP: 0018:ffffc90001ff7d38 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815c4e91 RDI: fffff520003fef99
RBP: 0000000000000003 R08: ffff888088fbe300 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888089e6e040
R13: ffff888089e6e044 R14: 00000000000002ab R15: ffff8880935baac0
 refcount_sub_and_test include/linux/refcount.h:261 [inline]
 refcount_dec_and_test include/linux/refcount.h:281 [inline]
 put_net include/net/net_namespace.h:259 [inline]
 free_nsproxy+0x445/0x4a0 kernel/nsproxy.c:206
 switch_task_namespaces+0xaa/0xc0 kernel/nsproxy.c:252
 do_exit+0xb4e/0x2e10 kernel/exit.c:801
 do_group_exit+0x125/0x340 kernel/exit.c:900
 __do_sys_exit_group kernel/exit.c:911 [inline]
 __se_sys_exit_group kernel/exit.c:909 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:909
 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43f998
Code: 24 38 80 f9 3a 0f 85 5f 01 00 00 48 8d 74 24 34 48 8d 7c 24 38 83 ea 01 89 54 24 34 e8 61 f8 ff ff 83 f8 3c 41 89 c1 0f 87 3d <01> 00 00 8b 4c 24 34 85 c9 0f 8e 59 01 00 00 48 8b 54 24 38 c7 44
RSP: 002b:00007ffee85ac758 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 000000000043f998
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00000000004bfa10 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000120080522 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d11c0 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (103):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-linux-next-kasan-gce-root 2020/03/13 18:37 linux-next 770fbb32d34e d850e9d0 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/04/07 04:51 upstream 7e63420847ae 99a96044 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/04/03 22:53 upstream bef7b2a7be28 5ed396e6 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/04/02 13:50 upstream 919dce24701f a34e2c33 .config console log report syz C
ci-upstream-kasan-gce-root 2020/04/01 20:11 upstream 1a323ea5356e a34e2c33 .config console log report syz C
ci-upstream-kasan-gce-root 2020/03/31 07:22 upstream 673b41e04a03 c8d1cc20 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/30 21:40 upstream 7111951b8d49 c8d1cc20 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/30 16:55 upstream 7111951b8d49 c8d1cc20 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/30 16:48 upstream 7111951b8d49 c8d1cc20 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/30 05:31 upstream e595dd94515e 05736b29 .config console log report syz C
ci-upstream-kasan-gce-root 2020/03/29 07:29 upstream 906c40438bb6 05736b29 .config console log report syz C
ci-upstream-kasan-gce-root 2020/03/28 23:37 upstream 69c5eea3128e f1ebdfba .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/28 23:14 upstream 69c5eea3128e f1ebdfba .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/28 14:20 upstream 69c5eea3128e f1ebdfba .config console log report syz C
ci-upstream-kasan-gce-root 2020/03/27 02:25 upstream 9420e8ade435 6d25c5a0 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/21 20:44 upstream 5ad0ec0b8652 4288d95e .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/21 19:49 upstream 5ad0ec0b8652 4288d95e .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/21 18:33 upstream 5ad0ec0b8652 4288d95e .config console log report syz C
ci-upstream-kasan-gce 2020/03/18 05:04 upstream ac309e7744be 97bc55ce .config console log report syz C
ci-upstream-kasan-gce-root 2020/03/18 04:31 upstream ac309e7744be 97bc55ce .config console log report syz C
ci-upstream-kasan-gce-root 2020/03/18 03:42 upstream ac309e7744be 97bc55ce .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/17 05:33 upstream fb33c6510d55 749688d2 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/17 04:52 upstream fb33c6510d55 749688d2 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/17 03:52 upstream fb33c6510d55 749688d2 .config console log report syz C
ci-upstream-kasan-gce 2020/03/16 20:49 upstream fb33c6510d55 749688d2 .config console log report syz C
ci-upstream-kasan-gce 2020/03/15 06:00 upstream 69a4d0baeeb1 749688d2 .config console log report syz C
ci-upstream-kasan-gce 2020/03/14 23:06 upstream 69a4d0baeeb1 749688d2 .config console log report syz C
ci-upstream-kasan-gce 2020/03/13 16:18 upstream 3cc6e2c599cd d850e9d0 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/12 03:39 upstream e3a36eb6dfae e7caca8e .config console log report syz C
ci-upstream-kasan-gce-386 2020/03/18 05:14 upstream ac309e7744be 97bc55ce .config console log report syz C
ci-upstream-kasan-gce-386 2020/03/17 04:34 upstream fb33c6510d55 749688d2 .config console log report syz C
ci-upstream-kasan-gce-386 2020/03/15 21:35 upstream d3dca69085e9 749688d2 .config console log report syz C
ci-upstream-kasan-gce-386 2020/03/15 17:29 upstream d3dca69085e9 749688d2 .config console log report syz C
ci-upstream-kasan-gce-386 2020/03/13 15:56 upstream 3cc6e2c599cd d850e9d0 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/03/17 17:07 net 32ca98feab8c 749688d2 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/03/16 20:16 net ef299cc3fa1a 749688d2 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/03/16 00:32 net 0fda7600c2e1 749688d2 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/03/14 00:26 net b09fe70ef520 d850e9d0 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/03/10 18:26 net 236205942749 35f53e45 .config console log report syz C
ci-upstream-net-kasan-gce 2020/03/16 02:14 net-next 5d0ab06b63fc 749688d2 .config console log report syz C
ci-upstream-net-kasan-gce 2020/03/15 02:51 net-next 94229d45239b 749688d2 .config console log report syz C
ci-upstream-net-kasan-gce 2020/03/14 14:44 net-next 1d3435793123 749688d2 .config console log report syz C
ci-upstream-net-kasan-gce 2020/03/13 12:01 net-next 93e616131a38 d850e9d0 .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/10 23:03 linux-next 0434e521ce3b a8c6a3f8 .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/08 17:50 linux-next 5798bd75ab13 db9bcd4b .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/08 13:36 linux-next 5798bd75ab13 db9bcd4b .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/07 04:03 linux-next b2e2a818a017 99a96044 .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/29 01:28 linux-next 770fbb32d34e 05736b29 .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/28 23:18 linux-next 770fbb32d34e f1ebdfba .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/22 08:48 linux-next 770fbb32d34e 78267cec .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/01/11 18:53 linux-next 6c09d7dbb7d3 4c04afaa .config console log report syz C
* Struck through repros no longer work on HEAD.