aboutsummaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorGravatar David Safford <david.safford@gmail.com> 2022-06-07 14:07:57 -0400
committerGravatar Jarkko Sakkinen <jarkko@kernel.org> 2022-06-08 14:12:13 +0300
commitdda5384313a40ecbaafd8a9a80f47483255e4c4d (patch)
tree4844450a4789b452a0561451cb270f173d57e948 /net/socket.c
parentMerge tag 'input-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-dda5384313a40ecbaafd8a9a80f47483255e4c4d.tar.gz
linux-dda5384313a40ecbaafd8a9a80f47483255e4c4d.tar.bz2
linux-dda5384313a40ecbaafd8a9a80f47483255e4c4d.zip
KEYS: trusted: tpm2: Fix migratable logic
When creating (sealing) a new trusted key, migratable trusted keys have the FIXED_TPM and FIXED_PARENT attributes set, and non-migratable keys don't. This is backwards, and also causes creation to fail when creating a migratable key under a migratable parent. (The TPM thinks you are trying to seal a non-migratable blob under a migratable parent.) The following simple patch fixes the logic, and has been tested for all four combinations of migratable and non-migratable trusted keys and parent storage keys. With this logic, you will get a proper failure if you try to create a non-migratable trusted key under a migratable parent storage key, and all other combinations work correctly. Cc: stable@vger.kernel.org # v5.13+ Fixes: e5fb5d2c5a03 ("security: keys: trusted: Make sealed key properly interoperable") Signed-off-by: David Safford <david.safford@gmail.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions