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] [day] [month] [year] [list]
Date:   Fri, 02 Jun 2023 15:39:30 +0200
From:   Roberto Sassu <roberto.sassu@...weicloud.com>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     Stefan Berger <stefanb@...ux.ibm.com>, dhowells@...hat.com,
        herbert@...dor.apana.org.au, davem@...emloft.net,
        zohar@...ux.ibm.com, dmitry.kasatkin@...il.com,
        paul@...l-moore.com, jmorris@...ei.org, serge@...lyn.com,
        Jarkko Sakkinen <jarkko@...nel.org>,
        linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org, keyrings@...r.kernel.org,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org, Roberto Sassu <roberto.sassu@...wei.com>
Subject: Re: [PATCH v5 2/2] KEYS: asymmetric: Copy sig and digest in
 public_key_verify_signature()

On Fri, 2023-06-02 at 06:17 -0700, Eric Biggers wrote:
> On Fri, Jun 02, 2023 at 11:17:04AM +0200, Roberto Sassu wrote:
> > On Thu, 2023-06-01 at 17:00 -0400, Stefan Berger wrote:
> > > On 12/27/22 09:27, Roberto Sassu wrote:
> > > > From: Roberto Sassu <roberto.sassu@...wei.com>
> > > > 
> > > > Commit ac4e97abce9b8 ("scatterlist: sg_set_buf() argument must be in linear
> > > > mapping") checks that both the signature and the digest reside in the
> > > > linear mapping area.
> > > > 
> > > > However, more recently commit ba14a194a434c ("fork: Add generic vmalloced
> > > > stack support") made it possible to move the stack in the vmalloc area,
> > > > which is not contiguous, and thus not suitable for sg_set_buf() which needs
> > > > adjacent pages.
> > > > 
> > > > Always make a copy of the signature and digest in the same buffer used to
> > > > store the key and its parameters, and pass them to sg_init_one(). Prefer it
> > > > to conditionally doing the copy if necessary, to keep the code simple. The
> > > > buffer allocated with kmalloc() is in the linear mapping area.
> > > > 
> > > > Cc: stable@...r.kernel.org # 4.9.x
> > > > Fixes: ba14a194a434 ("fork: Add generic vmalloced stack support")
> > > > Link: https://lore.kernel.org/linux-integrity/Y4pIpxbjBdajymBJ@sol.localdomain/
> > > > Suggested-by: Eric Biggers <ebiggers@...nel.org>
> > > > Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> > > > Reviewed-by: Eric Biggers <ebiggers@...gle.com>
> > > 
> > > I just ran into an issue with OpenBMC on ARM where EVM ECDSA signature verification failed due to invalid hashes being passed to the ECDSA signature verification algorithm. This patch here resolved the issue.
> > > 
> > > Tested-by: Stefan Berger <stefanb@...ux.ibm.com>
> > 
> > Thanks, Stefan.
> > 
> > I did multiple attempts to have the patch included, but I didn't have
> > any luck with the maintainers (David, Jarkko).
> > 
> > It would be awesome if any maintainer picks it.
> > 
> > Thanks!
> > 
> 
> As the maintainers are ignoring this patch, you could try the "maintainers of
> last resort" (Andrew Morton or Linus Torvalds).

Thanks, will do.

Roberto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ