From: Roman Smirnov <r.smirnov@omp.ru>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
Sergey Shtylyov <s.shtylyov@omp.ru>,
Karina Yankevich <k.yankevich@omp.ru>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: Re: [PATCH] crypto: ecc: fix NULL pointer dereferencing in ecc_gen_privkey()
Date: Thu, 21 Mar 2024 12:01:02 +0000 [thread overview]
Message-ID: <e5a3f28ec5cf426998f00083ec4f1f58@omp.ru> (raw)
In-Reply-To: <ZfwD5EojMLYqBaid@gondor.apana.org.au>
On Thu, 21 Mar 2024 17:54:44 +0800, Herbert Xu wrote:
> On Thu, Mar 07, 2024 at 10:13:18AM +0300, Roman Smirnov wrote:
> > ecc_get_curve() can return NULL. It is necessary to check
> > for NULL before dereferencing.
> >
> > Found by Linux Verification Center (linuxtesting.org) with Svace.
> >
> > Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
> > Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> > ---
> > crypto/ecc.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
>
> Please point me to the exact code path where this can happen.
I didn't find a specific path. Several places in the file have this
check:
ecc_make_pub_key()
crypto_ecdh_shared_secret()
I thought it was needed in this place too.
prev parent reply other threads:[~2024-03-21 12:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 7:13 [PATCH] crypto: ecc: fix NULL pointer dereferencing in ecc_gen_privkey() Roman Smirnov
2024-03-21 9:54 ` Herbert Xu
2024-03-21 12:01 ` Roman Smirnov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5a3f28ec5cf426998f00083ec4f1f58@omp.ru \
--to=r.smirnov@omp.ru \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=k.yankevich@omp.ru \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=s.shtylyov@omp.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox