[moderation] [lsm?] [keyrings?] KCSAN: data-race in key_garbage_collector / key_set_expiry

3 views
Skip to first unread message

syzbot

unread,
May 11, 2025, 7:39:24 PM5/11/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cd802e7e5f1e Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1583b768580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6154604431d9aaf9
dashboard link: https://syzkaller.appspot.com/bug?extid=98a0deb9e9456bf5250c
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
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/fdb14cb5e78f/disk-cd802e7e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c8b91b8b365f/vmlinux-cd802e7e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/69520a7040dd/bzImage-cd802e7e.xz

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

==================================================================
BUG: KCSAN: data-race in key_garbage_collector / key_set_expiry

write to 0xffffffff869eb168 of 8 bytes by task 3395 on cpu 1:
key_schedule_gc security/keys/gc.c:63 [inline]
key_garbage_collector+0x6d6/0x8f0 security/keys/gc.c:286
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3319
worker_thread+0x582/0x770 kernel/workqueue.c:3400
kthread+0x486/0x510 kernel/kthread.c:464
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffffffff869eb168 of 8 bytes by task 4277 on cpu 0:
key_schedule_gc security/keys/gc.c:61 [inline]
key_set_expiry+0xea/0x190 security/keys/gc.c:78
key_reject_and_link+0x18b/0x310 security/keys/key.c:609
key_negate_and_link include/linux/key-type.h:188 [inline]
complete_request_key security/keys/request_key.c:67 [inline]
call_sbin_request_key+0x656/0x6b0 security/keys/request_key.c:216
construct_key security/keys/request_key.c:247 [inline]
construct_key_and_link security/keys/request_key.c:519 [inline]
request_key_and_link+0x8bc/0xd70 security/keys/request_key.c:653
__do_sys_request_key security/keys/keyctl.c:222 [inline]
__se_sys_request_key+0x1df/0x290 security/keys/keyctl.c:167
__x64_sys_request_key+0x55/0x70 security/keys/keyctl.c:167
x64_sys_call+0x2f19/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:250
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x7fffffffffffffff -> 0x000000006821354a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4277 Comm: syz.0.242 Not tainted 6.15.0-rc5-syzkaller-00353-gcd802e7e5f1e #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================
iwpm_register_pid: Unable to send a nlmsg (client = 2)
infiniband syz1: RDMA CMA: cma_listen_on_dev, error -98


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

Aleksandr Nogikh

unread,
May 12, 2025, 2:34:11 AM5/12/25
to syzbot, syzkaller-upst...@googlegroups.com
#syz upstream
> --
> 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 visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/6821352b.050a0220.f2294.0044.GAE%40google.com.
Reply all
Reply to author
Forward
0 new messages