lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <772253.1610017082@warthog.procyon.org.uk>
Date:   Thu, 07 Jan 2021 10:58:02 +0000
From:   David Howells <dhowells@...hat.com>
To:     Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
Cc:     dhowells@...hat.com, Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Gilad Ben-Yossef <gilad@...yossef.com>,
        Tobias Markus <tobias@...kus-regensburg.de>,
        Tee Hao Wei <angelsl@...4.sg>, keyrings@...r.kernel.org,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH] X.509: Fix crash caused by NULL pointer

Tianjia Zhang <tianjia.zhang@...ux.alibaba.com> wrote:

> 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")
> Cc: stable@...r.kernel.org # v5.10+
> Reported-by: Tobias Markus <tobias@...kus-regensburg.de>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>

Looks reasonable:

Acked-by: David Howells <dhowells@...hat.com>

I wonder, though, if cert_sig_digest_update() should be obtained by some sort
of function pointer.  It doesn't really seem to belong in this file.  But this
is a separate issue.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ