* [PATCH] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
@ 2018-11-03 17:41 Eric Biggers
0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2018-11-03 17:41 UTC (permalink / raw)
To: keyrings
From: Eric Biggers <ebiggers@google.com>
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 <ebiggers@google.com>
---
crypto/asymmetric_keys/asym_tpm.c | 1 +
crypto/asymmetric_keys/public_key.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
index 5d4c270463f60..8eeb2d251a82a 100644
--- a/crypto/asymmetric_keys/asym_tpm.c
+++ b/crypto/asymmetric_keys/asym_tpm.c
@@ -479,6 +479,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;
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index f5d85b47fcc6d..65fc08d9be087 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -169,6 +169,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;
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
@ 2019-01-10 20:28 Eric Biggers
0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2019-01-10 20:28 UTC (permalink / raw)
To: keyrings
On Sat, Nov 03, 2018 at 10:41:07AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> 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 <ebiggers@google.com>
> ---
> crypto/asymmetric_keys/asym_tpm.c | 1 +
> crypto/asymmetric_keys/public_key.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
> index 5d4c270463f60..8eeb2d251a82a 100644
> --- a/crypto/asymmetric_keys/asym_tpm.c
> +++ b/crypto/asymmetric_keys/asym_tpm.c
> @@ -479,6 +479,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;
> diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
> index f5d85b47fcc6d..65fc08d9be087 100644
> --- a/crypto/asymmetric_keys/public_key.c
> +++ b/crypto/asymmetric_keys/public_key.c
> @@ -169,6 +169,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;
> --
> 2.19.1
>
Ping.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
@ 2019-02-07 23:36 Eric Biggers
0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2019-02-07 23:36 UTC (permalink / raw)
To: keyrings
On Thu, Jan 10, 2019 at 12:28:10PM -0800, Eric Biggers wrote:
> On Sat, Nov 03, 2018 at 10:41:07AM -0700, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > 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 <ebiggers@google.com>
> > ---
> > crypto/asymmetric_keys/asym_tpm.c | 1 +
> > crypto/asymmetric_keys/public_key.c | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
> > index 5d4c270463f60..8eeb2d251a82a 100644
> > --- a/crypto/asymmetric_keys/asym_tpm.c
> > +++ b/crypto/asymmetric_keys/asym_tpm.c
> > @@ -479,6 +479,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;
> > diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
> > index f5d85b47fcc6d..65fc08d9be087 100644
> > --- a/crypto/asymmetric_keys/public_key.c
> > +++ b/crypto/asymmetric_keys/public_key.c
> > @@ -169,6 +169,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;
> > --
> > 2.19.1
> >
>
> Ping.
Ping. David, are you planning to apply this?
- Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails
@ 2019-03-18 17:28 Eric Biggers
0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2019-03-18 17:28 UTC (permalink / raw)
To: keyrings
On Thu, Feb 07, 2019 at 03:36:02PM -0800, Eric Biggers wrote:
> On Thu, Jan 10, 2019 at 12:28:10PM -0800, Eric Biggers wrote:
> > On Sat, Nov 03, 2018 at 10:41:07AM -0700, Eric Biggers wrote:
> > > From: Eric Biggers <ebiggers@google.com>
> > >
> > > 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 <ebiggers@google.com>
> > > ---
> > > crypto/asymmetric_keys/asym_tpm.c | 1 +
> > > crypto/asymmetric_keys/public_key.c | 1 +
> > > 2 files changed, 2 insertions(+)
> > >
> > > diff --git a/crypto/asymmetric_keys/asym_tpm.c b/crypto/asymmetric_keys/asym_tpm.c
> > > index 5d4c270463f60..8eeb2d251a82a 100644
> > > --- a/crypto/asymmetric_keys/asym_tpm.c
> > > +++ b/crypto/asymmetric_keys/asym_tpm.c
> > > @@ -479,6 +479,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;
> > > diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
> > > index f5d85b47fcc6d..65fc08d9be087 100644
> > > --- a/crypto/asymmetric_keys/public_key.c
> > > +++ b/crypto/asymmetric_keys/public_key.c
> > > @@ -169,6 +169,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;
> > > --
> > > 2.19.1
> > >
> >
> > Ping.
>
> Ping. David, are you planning to apply this?
>
> - Eric
Ping.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-18 17:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-03 17:41 [PATCH] KEYS: asymmetric: return ENOMEM if akcipher_request_alloc() fails Eric Biggers
-- strict thread matches above, loose matches on Subject: below --
2019-01-10 20:28 Eric Biggers
2019-02-07 23:36 Eric Biggers
2019-03-18 17:28 Eric Biggers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.