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: 991d, last: 870d

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 1643d 1668d 6/24 fixed on 2018/05/08 18:30
Patch testing requests:
Created Duration User Patch Repo Result
2022/09/18 03:29 16m upstream OK log
2022/09/18 00:29 15m upstream OK log
2022/09/17 21:29 15m upstream OK log
2022/09/17 18:29 16m upstream OK log
2022/09/17 15:29 8m upstream error
2022/09/17 12:29 16m upstream OK log
2022/09/17 09:29 16m upstream OK log
2022/09/15 09:29 17m upstream OK log
2022/09/15 05:29 17m upstream OK log
2022/09/15 02:29 17m upstream OK log
2022/09/15 02:29 16m upstream OK log
2022/09/14 23:29 16m upstream OK log
2022/09/14 23:29 17m upstream OK log
2022/09/14 21:29 16m linux-next OK log
2022/09/14 20:29 16m upstream OK log
2022/09/14 20:29 16m upstream OK log
2022/09/14 18:29 9m linux-next report log
2022/09/14 17:29 16m upstream OK log
2022/09/14 17:29 17m upstream OK log
2022/09/14 15:29 10m linux-next report log
2022/09/14 14:27 16m upstream OK log
2022/09/14 14:27 16m upstream OK log
2022/09/14 12:27 9m linux-next report log
2022/09/14 10:27 16m upstream OK log
2022/09/14 06:27 10m linux-next report log
2022/09/14 05:27 16m upstream OK log
2022/09/14 03:27 10m linux-next report log
2022/09/14 02:27 17m upstream OK log
2022/09/14 00:27 10m linux-next report log
2022/09/13 23:27 16m upstream OK log
2022/09/13 20:27 10m linux-next report log
2022/09/13 17:27 9m linux-next report log
2022/09/09 08:27 15m upstream OK log
2022/09/09 04:27 16m upstream OK log
2022/09/08 23:27 16m upstream OK log
2022/09/08 19:27 16m upstream OK log
2022/09/08 15:27 16m upstream OK log
2022/09/07 23:27 16m net-next OK log
2022/09/07 20:27 16m net-next OK log
2022/09/07 16:27 17m net-next OK log
2022/09/07 10:27 16m net-next OK log
2022/09/06 20:27 16m net OK log
2022/09/06 16:27 17m net OK log
2022/09/06 12:27 16m net OK log
2022/09/06 08:27 16m net OK log
2022/09/06 04:27 16m net OK log
2022/09/05 19:27 16m upstream OK log
2022/09/05 15:27 15m upstream OK log
2022/09/05 11:27 16m upstream OK log
2022/09/05 06:27 15m upstream OK log
2022/09/05 02:27 16m 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-executor145'.
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 7173 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: 7173 Comm: syz-executor145 Not tainted 5.6.0-rc7-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:174 [inline]
 fixup_bug arch/x86/kernel/traps.c:169 [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 4c 63 1f fe e9 8a fe ff ff e8 f2 99 e2 fd 48 c7 c7 00 a9 51 88 c6 05 c6 a0 d1 06 01 e8 d7 aa 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:ffffc900017a7d38 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815c06c1 RDI: fffff520002f4f99
RBP: 0000000000000003 R08: ffff88808e26a080 R09: ffffed1015ce6659
R10: ffffed1015ce6658 R11: ffff8880ae7332c7 R12: ffff888095f22040
R13: ffff888095f22044 R14: 00000000000002aa R15: ffff88809f3d1540
 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+0xb2f/0x2dd0 kernel/exit.c:800
 do_group_exit+0x125/0x340 kernel/exit.c:899
 __do_sys_exit_group kernel/exit.c:910 [inline]
 __se_sys_exit_group kernel/exit.c:908 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:908
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43f998
Code: Bad RIP value.
RSP: 002b:00007fffa0be6a28 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 Title
ci-upstream-kasan-gce-root 2020/03/29 07:29 upstream 906c40438bb6 05736b29 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/10 23:03 linux-next 0434e521ce3b a8c6a3f8 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/08 17:50 linux-next 5798bd75ab13 db9bcd4b .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/08 13:36 linux-next 5798bd75ab13 db9bcd4b .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/04/07 04:03 linux-next b2e2a818a017 99a96044 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/29 01:28 linux-next 770fbb32d34e 05736b29 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/28 23:18 linux-next 770fbb32d34e f1ebdfba .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/22 08:48 linux-next 770fbb32d34e 78267cec .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/13 18:37 linux-next 770fbb32d34e d850e9d0 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/04/07 04:51 upstream 7e63420847ae 99a96044 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/04/03 22:53 upstream bef7b2a7be28 5ed396e6 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/04/02 13:50 upstream 919dce24701f a34e2c33 .config log report syz C
ci-upstream-kasan-gce-root 2020/04/01 20:11 upstream 1a323ea5356e a34e2c33 .config log report syz C
ci-upstream-kasan-gce-root 2020/03/31 07:22 upstream 673b41e04a03 c8d1cc20 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/30 21:40 upstream 7111951b8d49 c8d1cc20 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/30 16:55 upstream 7111951b8d49 c8d1cc20 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/30 16:48 upstream 7111951b8d49 c8d1cc20 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/30 05:31 upstream e595dd94515e 05736b29 .config log report syz C
ci-upstream-kasan-gce-root 2020/03/28 23:37 upstream 69c5eea3128e f1ebdfba .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/28 23:14 upstream 69c5eea3128e f1ebdfba .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/28 14:20 upstream 69c5eea3128e f1ebdfba .config log report syz C
ci-upstream-kasan-gce-root 2020/03/27 02:25 upstream 9420e8ade435 6d25c5a0 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/21 20:44 upstream 5ad0ec0b8652 4288d95e .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/21 19:49 upstream 5ad0ec0b8652 4288d95e .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/21 18:33 upstream 5ad0ec0b8652 4288d95e .config log report syz C
ci-upstream-kasan-gce 2020/03/18 05:04 upstream ac309e7744be 97bc55ce .config log report syz C
ci-upstream-kasan-gce-root 2020/03/18 04:31 upstream ac309e7744be 97bc55ce .config log report syz C
ci-upstream-kasan-gce-root 2020/03/18 03:42 upstream ac309e7744be 97bc55ce .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/17 05:33 upstream fb33c6510d55 749688d2 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/17 04:52 upstream fb33c6510d55 749688d2 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/03/17 03:52 upstream fb33c6510d55 749688d2 .config log report syz C
ci-upstream-kasan-gce 2020/03/16 20:49 upstream fb33c6510d55 749688d2 .config log report syz C
ci-upstream-kasan-gce 2020/03/15 06:00 upstream 69a4d0baeeb1 749688d2 .config log report syz C
ci-upstream-kasan-gce 2020/03/14 23:06 upstream 69a4d0baeeb1 749688d2 .config log report syz C
ci-upstream-kasan-gce 2020/03/13 16:18 upstream 3cc6e2c599cd d850e9d0 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/12 03:39 upstream e3a36eb6dfae e7caca8e .config log report syz C
ci-upstream-kasan-gce-386 2020/03/18 05:14 upstream ac309e7744be 97bc55ce .config log report syz C
ci-upstream-kasan-gce-386 2020/03/17 04:34 upstream fb33c6510d55 749688d2 .config log report syz C
ci-upstream-kasan-gce-386 2020/03/15 21:35 upstream d3dca69085e9 749688d2 .config log report syz C
ci-upstream-kasan-gce-386 2020/03/15 17:29 upstream d3dca69085e9 749688d2 .config log report syz C
ci-upstream-kasan-gce-386 2020/03/13 15:56 upstream 3cc6e2c599cd d850e9d0 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/03/17 17:07 net 32ca98feab8c 749688d2 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/03/16 20:16 net ef299cc3fa1a 749688d2 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/03/16 00:32 net 0fda7600c2e1 749688d2 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/03/14 00:26 net b09fe70ef520 d850e9d0 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/03/10 18:26 net 236205942749 35f53e45 .config log report syz C
ci-upstream-net-kasan-gce 2020/03/16 02:14 net-next 5d0ab06b63fc 749688d2 .config log report syz C
ci-upstream-net-kasan-gce 2020/03/15 02:51 net-next 94229d45239b 749688d2 .config log report syz C
ci-upstream-net-kasan-gce 2020/03/14 14:44 net-next 1d3435793123 749688d2 .config log report syz C
ci-upstream-net-kasan-gce 2020/03/13 12:01 net-next 93e616131a38 d850e9d0 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/01/11 18:53 linux-next 6c09d7dbb7d3 4c04afaa .config log report syz C
* Struck through repros no longer work on HEAD.