syzbot


KCSAN: data-race in key_task_permission / keyctl_chown_key (2)

Status: auto-obsoleted due to no activity on 2023/08/08 03:56
Subsystems: keyrings lsm
[Documentation on labels]
First crash: 326d, last: 326d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in key_task_permission / keyctl_chown_key keyrings lsm 1 603d 603d 0/26 auto-obsoleted due to no activity on 2022/11/03 09:37
upstream KCSAN: data-race in key_task_permission / keyctl_chown_key (3) keyrings lsm 1 217d 217d 0/26 auto-obsoleted due to no activity on 2023/11/24 13:01
upstream KCSAN: data-race in key_task_permission / keyctl_chown_key (4) keyrings lsm 1 118d 118d 0/26 auto-obsoleted due to no activity on 2024/03/03 01:25

Sample crash report:
==================================================================
BUG: KCSAN: data-race in key_task_permission / keyctl_chown_key

write to 0xffff888104bc5f68 of 4 bytes by task 24768 on cpu 0:
 keyctl_chown_key+0x4f7/0x570 security/keys/keyctl.c:1035
 __do_sys_keyctl security/keys/keyctl.c:1916 [inline]
 __se_sys_keyctl+0x112/0xbb0 security/keys/keyctl.c:1869
 __x64_sys_keyctl+0x67/0x80 security/keys/keyctl.c:1869
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888104bc5f68 of 4 bytes by task 24767 on cpu 1:
 key_task_permission+0x11f/0x2b0 security/keys/permission.c:54
 keyring_search_iterator+0x10d/0x270 security/keys/keyring.c:616
 search_keyring security/keys/keyring.c:654 [inline]
 search_nested_keyrings+0x35f/0x9c0 security/keys/keyring.c:718
 keyring_search_rcu+0xf8/0x190 security/keys/keyring.c:922
 search_cred_keyrings_rcu+0x159/0x3b0 security/keys/process_keys.c:480
 search_process_keyrings_rcu security/keys/process_keys.c:544 [inline]
 lookup_user_key+0x80d/0xde0 security/keys/process_keys.c:762
 keyctl_chown_key+0x10b/0x570 security/keys/keyctl.c:970
 __do_sys_keyctl security/keys/keyctl.c:1916 [inline]
 __se_sys_keyctl+0x112/0xbb0 security/keys/keyctl.c:1869
 __x64_sys_keyctl+0x67/0x80 security/keys/keyctl.c:1869
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000000 -> 0x0000ee00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 24767 Comm: syz-executor.0 Not tainted 6.4.0-syzkaller-10207-g99bdeae21d25 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/04 03:51 upstream 99bdeae21d25 6e553898 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in key_task_permission / keyctl_chown_key
* Struck through repros no longer work on HEAD.