Skip to content

Commit d3cff4a

Browse files
ebiggersjarkkojs
authored andcommitted
KEYS: remove support for asym_tpm keys
asym_tpm keys are tied to TPM v1.2, which uses outdated crypto and has been deprecated in favor of TPM v2.0 for over 7 years. A very quick look at this code also immediately found some memory safety bugs (https://lore.kernel.org/r/20220113235440.90439-2-ebiggers@kernel.org). Note that this code is reachable by unprivileged users. According to Jarkko (one of the keyrings subsystem maintainers), this code has no practical use cases, and he isn't willing to maintain it (https://lore.kernel.org/r/YfFZPbKkgYJGWu1Q@iki.fi). Therefore, let's remove it. Note that this feature didn't have any documentation or tests, so we don't need to worry about removing those. Cc: David Howells <dhowells@redhat.com> Cc: Denis Kenzior <denkenz@gmail.com> Cc: James Morris <jmorris@namei.org> Cc: Jarkko Sakkinen <jarkko@kernel.org> Cc: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
1 parent 7e0438f commit d3cff4a

6 files changed

Lines changed: 0 additions & 1116 deletions

File tree

crypto/asymmetric_keys/Kconfig

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2222
appropriate hash algorithms (such as SHA-1) must be available.
2323
ENOPKG will be reported if the requisite algorithm is unavailable.
2424

25-
config ASYMMETRIC_TPM_KEY_SUBTYPE
26-
tristate "Asymmetric TPM backed private key subtype"
27-
depends on TCG_TPM
28-
depends on TRUSTED_KEYS
29-
select CRYPTO_HMAC
30-
select CRYPTO_SHA1
31-
select CRYPTO_HASH_INFO
32-
help
33-
This option provides support for TPM backed private key type handling.
34-
Operations such as sign, verify, encrypt, decrypt are performed by
35-
the TPM after the private key is loaded.
36-
3725
config X509_CERTIFICATE_PARSER
3826
tristate "X.509 certificate parser"
3927
depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE
@@ -54,15 +42,6 @@ config PKCS8_PRIVATE_KEY_PARSER
5442
private key data and provides the ability to instantiate a crypto key
5543
from that data.
5644

57-
config TPM_KEY_PARSER
58-
tristate "TPM private key parser"
59-
depends on ASYMMETRIC_TPM_KEY_SUBTYPE
60-
select ASN1
61-
help
62-
This option provides support for parsing TPM format blobs for
63-
private key data and provides the ability to instantiate a crypto key
64-
from that data.
65-
6645
config PKCS7_MESSAGE_PARSER
6746
tristate "PKCS#7 message parser"
6847
depends on X509_CERTIFICATE_PARSER

crypto/asymmetric_keys/Makefile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ asymmetric_keys-y := \
1111
signature.o
1212

1313
obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o
14-
obj-$(CONFIG_ASYMMETRIC_TPM_KEY_SUBTYPE) += asym_tpm.o
1514

1615
#
1716
# X.509 Certificate handling
@@ -75,14 +74,3 @@ verify_signed_pefile-y := \
7574

7675
$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
7776
$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h
78-
79-
#
80-
# TPM private key parsing
81-
#
82-
obj-$(CONFIG_TPM_KEY_PARSER) += tpm_key_parser.o
83-
tpm_key_parser-y := \
84-
tpm.asn1.o \
85-
tpm_parser.o
86-
87-
$(obj)/tpm_parser.o: $(obj)/tpm.asn1.h
88-
$(obj)/tpm.asn1.o: $(obj)/tpm.asn1.c $(obj)/tpm.asn1.h

0 commit comments

Comments
 (0)