KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
Subsystems (3)
PATCH RESEND 1/1 KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
--- crypto/asymmetric_keys/asym_tpm.c | 1 + crypto/asymmetric_keys/public_key.c | 1 + 2 files changed, 2 insertions(+)
crypto/asymmetric_keys/asym_tpm.c +1 -0
@@ -486,6 +486,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,if (ret <0 ) goto error_free_tfm; + ret = -ENOMEM ; req =akcipher_request_alloc (tfm,GFP_KERNEL );if (!req) goto error_free_tfm;
crypto/asymmetric_keys/public_key.c +1 -0
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,if (IS_ERR (tfm))return PTR_ERR (tfm); + ret = -ENOMEM ; req =akcipher_request_alloc (tfm,GFP_KERNEL );if (!req) goto error_free_tfm;
Signature · 1 line
2.22.0.rc1.257.g3120a18244-goog
Quoted 7 lines · Eric Biggers
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
Fixes ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")Fixes c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")Signed-off-by Eric Biggers <[email protected]>
Signature · 2 lines
James Morris <[email protected]>
PATCH RESEND 1/1 KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
In reply to Eric BiggersFrom: Eric Biggers <[email protected]>
No error code was being set on this error path.
--- crypto/asymmetric_keys/asym_tpm.c | 1 + crypto/asymmetric_keys/public_key.c | 1 + 2 files changed, 2 insertions(+)
crypto/asymmetric_keys/asym_tpm.c +1 -0
@@ -486,6 +486,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,if (ret <0 ) goto error_free_tfm; + ret = -ENOMEM ; req =akcipher_request_alloc (tfm,GFP_KERNEL );if (!req) goto error_free_tfm;
crypto/asymmetric_keys/public_key.c +1 -0
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,if (IS_ERR (tfm))return PTR_ERR (tfm); + ret = -ENOMEM ; req =akcipher_request_alloc (tfm,GFP_KERNEL );if (!req) goto error_free_tfm;
Signature · 1 line
2.22.1
PATCH RESEND 1/1 KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
In reply to Eric BiggersFrom: Eric Biggers <[email protected]>
No error code was being set on this error path.
--- crypto/asymmetric_keys/asym_tpm.c | 1 + crypto/asymmetric_keys/public_key.c | 1 + 2 files changed, 2 insertions(+)
crypto/asymmetric_keys/asym_tpm.c +1 -0
@@ -486,6 +486,7 @@ static int tpm_key_encrypt(struct tpm_key *tk,if (ret <0 ) goto error_free_tfm; + ret = -ENOMEM ; req =akcipher_request_alloc (tfm,GFP_KERNEL );if (!req) goto error_free_tfm;
crypto/asymmetric_keys/public_key.c +1 -0
@@ -184,6 +184,7 @@ static int software_key_eds_op(struct kernel_pkey_params *params,if (IS_ERR (tfm))return PTR_ERR (tfm); + ret = -ENOMEM ; req =akcipher_request_alloc (tfm,GFP_KERNEL );if (!req) goto error_free_tfm;
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog
Quoted 8 lines · Eric Biggers
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
Fixes ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")Fixes c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")Reviewed-by James Morris <[email protected]>Signed-off-by Eric Biggers <[email protected]>
I can pick this up to my tree given the TPM association. David?
/Jarkko
Quoted 10 lines · Jarkko Sakkinen
Quoted 8 lines · Eric Biggers
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
Fixes ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")Fixes c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")Reviewed-by James Morris <[email protected]>Signed-off-by Eric Biggers <[email protected]>
Quoted 6 lines
Reviewed-by Jarkko Sakkinen <[email protected]>I can pick this up to my tree given the TPM association. David?
/Jarkko
Ping.
Quoted 11 lines · Eric Biggers
Quoted 10 lines · Jarkko Sakkinen
Quoted 8 lines · Eric Biggers
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
Fixes ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")Fixes c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")Reviewed-by James Morris <[email protected]>Signed-off-by Eric Biggers <[email protected]>
Quoted 8 lines
Quoted 6 lines
Reviewed-by Jarkko Sakkinen <[email protected]>I can pick this up to my tree given the TPM association. David?
/Jarkko
Ping.
I can pick this up to my v5.5-rc2 PR (already sent one for rc1).
/Jarkko
Quoted 17 lines · Jarkko Sakkinen
Quoted 16 lines · Eric Biggers
Quoted 15 lines · Jarkko Sakkinen
Quoted 8 lines · Eric Biggers
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
Fixes ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")Fixes c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")Reviewed-by James Morris <[email protected]>Signed-off-by Eric Biggers <[email protected]>Reviewed-by Jarkko Sakkinen <[email protected]>I can pick this up to my tree given the TPM association. David?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
/Jarkko
Ping.
I can pick this up to my v5.5-rc2 PR (already sent one for rc1).
/Jarkko
Ping.
Jarkko Sakkinen
AppliedQuoted 8 lines · Eric Biggers
From: Eric Biggers <[email protected]>
No error code was being set on this error path.
Fixes ad4b1eb5fb33 ("KEYS: asym_tpm: Implement encryption operation [ver #2]")Fixes c08fed737126 ("KEYS: Implement encrypt, decrypt and sign for software asymmetric key [ver #2]")Reviewed-by James Morris <[email protected]>Signed-off-by Eric Biggers <[email protected]>
Applied to git://git.infradead.org/users/jjs/linux-tpmdd.git
/Jarkko