WARNING: refcount bug in key_put

4 views
Skip to first unread message

syzbot

unread,
Sep 3, 2019, 2:08:08 PM9/3/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 6525771f Merge tag 'arc-5.3-rc7' of git://git.kernel.org/p..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=177a90fe600000
kernel config: https://syzkaller.appspot.com/x/.config?x=58485246ad14eafe
dashboard link: https://syzkaller.appspot.com/bug?extid=bca8c265fd6cb60b9b0b
compiler: clang version 9.0.0 (/home/glider/llvm/clang
80fee25776c2fb61e74c1ecb1a523375c2500b69)
CC: [dhow...@redhat.com jmo...@namei.org
keyr...@vger.kernel.org linux-...@vger.kernel.org
linux-secu...@vger.kernel.org se...@hallyn.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+bca8c2...@syzkaller.appspotmail.com

------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 16 at lib/refcount.c:190
refcount_sub_and_test_checked+0x1d6/0x230 lib/refcount.c:190
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.3.0-rc6+ #94
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+0x1d8/0x2f8 lib/dump_stack.c:113
panic+0x25c/0x799 kernel/panic.c:219
__warn+0x22f/0x230 kernel/panic.c:576
report_bug+0x190/0x290 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:179 [inline]
do_error_trap+0xd7/0x440 arch/x86/kernel/traps.c:272
do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:291
invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1028
RIP: 0010:refcount_sub_and_test_checked+0x1d6/0x230 lib/refcount.c:190
Code: 68 05 01 75 09 e8 4a 3f 21 fe 31 db eb ca e8 41 3f 21 fe c6 05 50 6f
68 05 01 31 db 48 c7 c7 01 51 45 88 31 c0 e8 5a 21 f4 fd <0f> 0b eb aa 44
89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 67 fe ff ff 4c
RSP: 0000:ffff8880a98efb88 EFLAGS: 00010246
RAX: 0f00c7f58569c100 RBX: 0000000000000000 RCX: ffff8880a98d6440
RDX: 0000000000000100 RSI: 0000000000000100 RDI: 0000000000000000
RBP: ffff8880a98efbc0 R08: ffffffff815cf7d4 R09: fffffbfff111a93f
R10: fffffbfff111a93f R11: 0000000000000000 R12: ffff88808d5d5b40
R13: 0000000000000000 R14: 0000000000000001 R15: 1ffff1101531df71
refcount_dec_and_test_checked+0x1a/0x20 lib/refcount.c:220
key_put+0x1a/0x80 security/keys/key.c:646
keyring_free_object+0x19/0x20 security/keys/keyring.c:389
assoc_array_destroy_subtree+0x29b/0x4e0 lib/assoc_array.c:393
assoc_array_rcu_cleanup+0x186/0x1b0 lib/assoc_array.c:1326
__rcu_reclaim kernel/rcu/rcu.h:222 [inline]
rcu_do_batch kernel/rcu/tree.c:2114 [inline]
rcu_core+0x892/0xf10 kernel/rcu/tree.c:2314
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2323
__do_softirq+0x333/0x7c4 arch/x86/include/asm/paravirt.h:778
run_ksoftirqd+0x64/0xf0 kernel/softirq.c:603
smpboot_thread_fn+0x5b3/0x9a0 kernel/smpboot.c:165
kthread+0x332/0x350 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Nov 29, 2019, 2:58:03 AM11/29/19
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages