syzbot


WARNING: refcount bug in secretmem_release

Status: closed as dup on 2021/10/25 06:38
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+f395614f1d99f2f0c1bb@syzkaller.appspotmail.com
First crash: 1105d, last: 1105d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
WARNING: refcount bug in sys_memfd_secret mm C done done 4217 1103d 1106d

Sample crash report:
------------[ 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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/23 18:09 upstream 9c0c4d24ac00 282f03fb .config console log report info ci-upstream-kasan-gce-smack-root WARNING: refcount bug in secretmem_release
* Struck through repros no longer work on HEAD.