WARNING: refcount bug in free_nsproxy

20 views
Skip to first unread message

syzbot

unread,
Mar 5, 2018, 11:59:05 AM3/5/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot hit the following crash on bpf-next commit
ca435f88c102e051207a95d769a1b37cc471d875 (Sun Mar 4 23:45:39 2018 +0000)
Merge tag 'batadv-next-for-davem-20180302' of
git://git.open-mesh.org/linux-merge

Unfortunately, I don't have any reproducer for this crash yet.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.
CC: [ac...@redhat.com hbat...@linux.vnet.ibm.com jo...@kernel.org
linux-...@vger.kernel.org pet...@infradead.org]

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+563944...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

RBP: 000000000072bea0 R08: 0000000020000200 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014
R13: 00000000000003eb R14: 00000000006f5ea8 R15: 0000000000000010
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 28098 at lib/refcount.c:187
refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 28098 Comm: syz-executor5 Not tainted 4.16.0-rc2+ #24
cgroup: cgroup2: unknown option ""
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+0x211/0x2d0 lib/bug.c:184
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
cgroup: cgroup2: unknown option ""
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
invalid_op+0x58/0x80 arch/x86/entry/entry_64.S:957
RIP: 0010:refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
RSP: 0018:ffff8801d4f47810 EFLAGS: 00010286
RAX: dffffc0000000008 RBX: 0000000000000000 RCX: ffffffff815ac22e
RDX: 0000000000000000 RSI: 1ffff1003a9e8eb2 RDI: 1ffff1003a9e8e87
RBP: ffff8801d4f478a0 R08: ffffffff86f395b8 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1003a9e8f03
R13: 00000000ffffffff R14: 0000000000000001 R15: ffff8801ae022084
refcount_dec_and_test+0x1a/0x20 lib/refcount.c:212
put_net include/net/net_namespace.h:220 [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+0x280/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x453e69
RSP: 002b:00007fff37e3d518 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000453e69
RDX: 000000000040e020 RSI: 0000000000a44bd0 RDI: 0000000000000045
RBP: 00000000004b8906 R08: 000000000000000b R09: 0000000000000000
R10: 000000000174b940 R11: 0000000000000246 R12: 0000000001754980
R13: 0000000000000000 R14: 0000000000000005 R15: 000000000174b914
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream
raw.log.txt
config.txt

Dmitry Vyukov

unread,
Apr 13, 2018, 4:45:55 AM4/13/18
to syzkaller-upstream-moderation
This is dup of "WARNING in kill_block_super" and will be fixed with "mm,vmscan: Allow preallocating memory for register_shrinker().".

Dmitry Vyukov

unread,
Apr 21, 2018, 7:56:14 AM4/21/18
to syzbot, Tetsuo Handa, 'Dmitry Vyukov' via syzkaller-upstream-moderation
#syz fix: mm,vmscan: Allow preallocating memory for register_shrinker().
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-upstream-moderation/001a1144bc442829ce0566ad3e47%40google.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages