syzbot


WARNING: refcount bug in free_nsproxy

Status: fixed on 2018/05/08 18:30
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+56394485c17bb4d52329@syzkaller.appspotmail.com
Fix commit: 8e04944f0ea8 mm,vmscan: Allow preallocating memory for register_shrinker().
First crash: 2483d, last: 2458d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in free_nsproxy (2) C done error 103 1685d 1802d 0/28 auto-obsoleted due to no activity on 2023/04/13 03:01

Sample crash report:
RBP: 000000000072bea0 R08: 0000000020000200 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000013
R13: 00000000000003fa R14: 00000000006f8010 R15: 000000000000003a
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 23341 at lib/refcount.c:187 refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 23341 Comm: syz-executor6 Not tainted 4.16.0-rc6+ #41
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
 panic+0x1e4/0x41c kernel/panic.c:183
 __warn+0x1dc/0x200 kernel/panic.c:547
 report_bug+0x1f4/0x2b0 lib/bug.c:186
 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
 fixup_bug arch/x86/kernel/traps.c:247 [inline]
 do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986
RIP: 0010:refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
RSP: 0018:ffff8801b5ac7810 EFLAGS: 00010286
RAX: dffffc0000000008 RBX: 0000000000000000 RCX: ffffffff815ba4be
RDX: 0000000000000000 RSI: 1ffff10036b58eb2 RDI: 1ffff10036b58e87
RBP: ffff8801b5ac78a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff10036b58f03
R13: 00000000ffffffff R14: 0000000000000001 R15: ffff8801cc860384
 refcount_dec_and_test+0x1a/0x20 lib/refcount.c:212
 put_net include/net/net_namespace.h:222 [inline]
 free_nsproxy+0x166/0x1f0 kernel/nsproxy.c:184
 switch_task_namespaces+0x9d/0xc0 kernel/nsproxy.c:229
 exit_task_namespaces+0x17/0x20 kernel/nsproxy.c:234
 do_exit+0x9b6/0x1ad0 kernel/exit.c:864
 do_group_exit+0x149/0x400 kernel/exit.c:968
 SYSC_exit_group kernel/exit.c:979 [inline]
 SyS_exit_group+0x1d/0x20 kernel/exit.c:977
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4548b9
RSP: 002b:00007ffee90b0be8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00000000004548b9
RDX: 000000000040e930 RSI: 0000000000a44bd0 RDI: 0000000000000045
RBP: 00000000004b9416 R08: 000000000000000b R09: 0000000000000000
R10: 0000000002327940 R11: 0000000000000246 R12: 0000000002330980
R13: 0000000000000000 R14: 0000000000000009 R15: 000000000030d71c
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/30 03:41 bpf-next 1379ef828a18 d47f0ed6 .config console log report ci-upstream-bpf-next-kasan-gce
2018/03/30 00:17 bpf-next 1379ef828a18 d47f0ed6 .config console log report ci-upstream-bpf-next-kasan-gce
2018/03/29 10:22 bpf-next 22527437e0a0 d47f0ed6 .config console log report ci-upstream-bpf-next-kasan-gce
2018/03/05 15:51 bpf-next ca435f88c102 bbd5104f .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.