[moderation] [lsm?] [keyrings?] KCSAN: data-race in lookup_user_key / prepare_creds (2)

0 views
Skip to first unread message

syzbot

unread,
Sep 29, 2025, 2:34:31 PM (3 days ago) Sep 29
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e5f0a698b34e Linux 6.17
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14f31ae2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c7f65ba98bb01573
dashboard link: https://syzkaller.appspot.com/bug?extid=e8414f3adb63f1d0b5bc
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [dhow...@redhat.com jar...@kernel.org jmo...@namei.org keyr...@vger.kernel.org linux-...@vger.kernel.org linux-secu...@vger.kernel.org pa...@paul-moore.com se...@hallyn.com]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ba163e979014/disk-e5f0a698.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bdc84f9d05a1/vmlinux-e5f0a698.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3a8e9862c64c/bzImage-e5f0a698.xz

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

process 'syz.0.57' launched '/dev/fd/12' with NULL argv: empty string added
==================================================================
BUG: KCSAN: data-race in lookup_user_key / prepare_creds

write to 0xffff88810212b0a8 of 4 bytes by task 3778 on cpu 1:
get_cred_many include/linux/cred.h:202 [inline]
get_cred include/linux/cred.h:218 [inline]
lookup_user_key+0xb6/0xd10 security/keys/process_keys.c:626
keyctl_keyring_unlink+0x23/0x120 security/keys/keyctl.c:558
__do_sys_keyctl security/keys/keyctl.c:1906 [inline]
__se_sys_keyctl+0x5a3/0xb80 security/keys/keyctl.c:1874
__x64_sys_keyctl+0x67/0x80 security/keys/keyctl.c:1874
x64_sys_call+0x2f6d/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:251
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810212b000 of 184 bytes by task 3766 on cpu 0:
prepare_creds+0x6c/0x4c0 kernel/cred.c:219
prepare_exec_creds+0x14/0xe0 kernel/cred.c:261
prepare_bprm_creds fs/exec.c:1364 [inline]
bprm_execve+0x70/0x970 fs/exec.c:1734
do_execveat_common+0x6e6/0x750 fs/exec.c:1860
do_execveat fs/exec.c:1945 [inline]
__do_sys_execveat fs/exec.c:2019 [inline]
__se_sys_execveat fs/exec.c:2013 [inline]
__x64_sys_execveat+0x73/0x90 fs/exec.c:2013
x64_sys_call+0x1fec/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3766 Comm: syz.0.57 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages