diff options
| author | 2026-10-10 23:40:00 +0300 | |
|---|---|---|
| committer | 2026-10-20 18:13:06 +0300 | |
| commit | 0b157166e612b70f98a332b6c7be7eac6f8e9593 (patch) | |
| tree | 616a452cf06dba6f8d6694df7aafd9a438321070 /scripts/Makefile.thinlto | |
| parent | KEYS: trusted: Fix blob allocation size in tpm2_key_decode() (diff) | |
KEYS: Fix key_reject_and_link() race with keyring restriction
The restrict_link check in key_reject_and_link() is done before taking
the keyring semaphore, racing with a concurrent keyring_restrict()
that installs the restriction while holding the semaphore in write
mode.
Move the check to after __key_link_lock(), so it is done under the
semaphore, matching the pattern used in __key_create_or_update().
Cc: stable@vger.kernel.org
Fixes: 5ac7eace2d00 ("KEYS: Add a facility to restrict new links into a keyring")
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Adrian Martinez <adrimg3196@gmail.com>
Link: https://lore.kernel.org/r/CACO1+RT+m==BY+ZPkE+fo536D0qu3wog4xE1dfuXQ56g+=Qv=A@mail.gmail.com
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
