syzbot


KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings

Status: auto-closed as invalid on 2021/06/08 03:51
Subsystems: keyrings lsm
[Documentation on labels]
Reported-by: syzbot+e4eb6db47eb0f80308c6@syzkaller.appspotmail.com
First crash: 1060d, last: 1060d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings 2 (3) 2021/05/04 17:01
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings (6) keyrings lsm 1 562d 562d 0/26 auto-obsoleted due to no activity on 2022/10/19 05:19
upstream KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings (5) keyrings lsm 3 649d 659d 0/26 auto-closed as invalid on 2022/07/23 15:16
upstream KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings (2) keyrings lsm 3 809d 838d 0/26 auto-closed as invalid on 2022/02/14 05:39
upstream KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings (7) keyrings lsm 3 218d 246d 0/26 auto-obsoleted due to no activity on 2023/09/28 05:53
upstream KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings (3) keyrings lsm 1 743d 743d 0/26 auto-closed as invalid on 2022/04/21 02:15
upstream KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings (4) keyrings lsm 1 700d 699d 0/26 auto-closed as invalid on 2022/06/03 03:04

Sample crash report:
==================================================================
BUG: KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings

write to 0xffff8881065ffc10 of 8 bytes by task 30966 on cpu 1:
 assoc_array_apply_edit+0x3e/0x660 lib/assoc_array.c:1357
 __key_link+0x8a/0xc0 security/keys/keyring.c:1372
 __key_instantiate_and_link+0x15b/0x290 security/keys/key.c:459
 key_create_or_update+0x750/0x990 security/keys/key.c:941
 __do_sys_add_key security/keys/keyctl.c:134 [inline]
 __se_sys_add_key+0x26f/0x300 security/keys/keyctl.c:74
 __x64_sys_add_key+0x63/0x70 security/keys/keyctl.c:74
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881065ffc10 of 8 bytes by task 30971 on cpu 0:
 search_nested_keyrings+0x34f/0x920 security/keys/keyring.c:751
 keyring_search_rcu+0xf4/0x180 security/keys/keyring.c:922
 search_cred_keyrings_rcu+0x135/0x240 security/keys/process_keys.c:480
 search_process_keyrings_rcu security/keys/process_keys.c:544 [inline]
 lookup_user_key+0xab6/0xd40 security/keys/process_keys.c:762
 __do_sys_add_key security/keys/keyctl.c:126 [inline]
 __se_sys_add_key+0x23a/0x300 security/keys/keyctl.c:74
 __x64_sys_add_key+0x63/0x70 security/keys/keyctl.c:74
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 30971 Comm: syz-executor.1 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/04 03:51 upstream 5e321ded302d 09efdd63 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in assoc_array_apply_edit / search_nested_keyrings
* Struck through repros no longer work on HEAD.