All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: " Tan Zhongjun" <hbut_tan@163.com>
Cc: tanzhongjun@yulong.com,
	"Tianjia Zhang" <tianjia.zhang@linux.alibaba.com>,
	"Tobias Markus" <tobias@markus-regensburg.de>,
	"David Howells" <dhowells@redhat.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"João Fonseca" <jpedrofonseca@ua.pt>,
	"Jarkko Sakkinen" <jarkko@kernel.org>,
	stable@vger.kernel.org,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: [PATCH] X.509: Fix crash caused by NULL pointer
Date: Fri, 22 Jan 2021 14:03:36 +0100	[thread overview]
Message-ID: <YArNKPD+3R7mx2gA@kroah.com> (raw)
In-Reply-To: <20210122121917.1414-1-hbut_tan@163.com>

On Fri, Jan 22, 2021 at 08:19:15PM +0800,  Tan Zhongjun wrote:
> From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> 
> On the following call path, `sig->pkey_algo` is not assigned
> in asymmetric_key_verify_signature(), which causes runtime
> crash in public_key_verify_signature().
> 
>   keyctl_pkey_verify
>     asymmetric_key_verify_signature
>       verify_signature
>         public_key_verify_signature
> 
> This patch simply check this situation and fixes the crash
> caused by NULL pointer.
> 
> Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate verification")
> Reported-by: Tobias Markus <tobias@markus-regensburg.de>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Reviewed-and-tested-by: Toke Høiland-Jørgensen <toke@redhat.com>
> Tested-by: João Fonseca <jpedrofonseca@ua.pt>
> Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
> Cc: stable@vger.kernel.org # v5.10+
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: george.tan <tanzhongjun@yulong.com>
> ---
>  crypto/asymmetric_keys/public_key.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Why send this to us again?  Is it needed somewhere we have not already
applied it to?

thanks,

greg k-h

  reply	other threads:[~2021-01-22 13:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 12:19 [PATCH] X.509: Fix crash caused by NULL pointer  Tan Zhongjun
2021-01-22 13:03 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-22 12:24  Tan Zhongjun
2021-01-21  9:06 hansyao
2021-01-19  0:13 David Howells
2021-01-13 13:06 David Howells
2021-01-13 13:03 David Howells
2021-01-07  9:28 Tianjia Zhang
2021-01-07 10:58 ` David Howells
2021-01-13  3:02   ` Tianjia Zhang

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=YArNKPD+3R7mx2gA@kroah.com \
    --to=greg@kroah.com \
    --cc=dhowells@redhat.com \
    --cc=hbut_tan@163.com \
    --cc=jarkko@kernel.org \
    --cc=jpedrofonseca@ua.pt \
    --cc=stable@vger.kernel.org \
    --cc=tanzhongjun@yulong.com \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=tobias@markus-regensburg.de \
    --cc=toke@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /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 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.