WARNING: refcount bug in secretmem_release

1 view
Skip to first unread message

syzbot

unread,
Oct 23, 2021, 3:35:20 PM10/23/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9c0c4d24ac00 Merge tag 'block-5.15-2021-10-22' of git://gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=131a0bb4b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=59f3ef2b4077575
dashboard link: https://syzkaller.appspot.com/bug?extid=f395614f1d99f2f0c1bb
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

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

------------[ cut here ]------------
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 0 PID: 13250 at lib/refcount.c:31 refcount_warn_saturate+0x17c/0x1a0 lib/refcount.c:31
Modules linked in:
CPU: 0 PID: 13250 Comm: syz-executor.2 Not tainted 5.15.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:refcount_warn_saturate+0x17c/0x1a0 lib/refcount.c:31
Code: b3 8a 31 c0 e8 f5 8d 3b fd 0f 0b e9 64 ff ff ff e8 79 79 71 fd c6 05 06 86 b6 09 01 48 c7 c7 a0 e2 b3 8a 31 c0 e8 d4 8d 3b fd <0f> 0b e9 43 ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a2 fe ff
RSP: 0018:ffffc90006027de8 EFLAGS: 00010246
RAX: 599a3e3d60ae7b00 RBX: 0000000000000004 RCX: ffff88802353d580
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: 0000000000000004 R08: ffffffff81695fe2 R09: ffffed10173857a8
R10: ffffed10173857a8 R11: 0000000000000000 R12: ffff88801fb5d6a8
R13: 1ffff11003f6bad5 R14: dffffc0000000000 R15: ffff88808c4932a0
FS: 00005555565ef400(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200002c4 CR3: 000000006ef90000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__refcount_dec include/linux/refcount.h:344 [inline]
refcount_dec include/linux/refcount.h:359 [inline]
secretmem_release+0x54/0x60 mm/secretmem.c:107
__fput+0x3fe/0x870 fs/file_table.c:280
task_work_run+0x146/0x1c0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
exit_to_user_mode_prepare+0x209/0x220 kernel/entry/common.c:207
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:300
do_syscall_64+0x53/0xd0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f4d609f267b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffea5750720 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000009 RCX: 00007f4d609f267b


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Dmitry Vyukov

unread,
Oct 25, 2021, 2:38:37 AM10/25/21
to syzbot, syzkaller-upst...@googlegroups.com
On Sat, 23 Oct 2021 at 21:35, syzbot
<syzbot+f39561...@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9c0c4d24ac00 Merge tag 'block-5.15-2021-10-22' of git://gi..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=131a0bb4b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=59f3ef2b4077575
> dashboard link: https://syzkaller.appspot.com/bug?extid=f395614f1d99f2f0c1bb
> compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
> CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+f39561...@syzkaller.appspotmail.com

#syz dup: WARNING: refcount bug in sys_memfd_secret
Reply all
Reply to author
Forward
0 new messages