lkml.org 
[lkml]   [2023]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 2/2] KEYS: asymmetric: Copy sig and digest in public_key_verify_signature()
From
Date
On Fri, 2023-01-27 at 09:27 +0100, Roberto Sassu wrote:
> On Thu, 2022-12-29 at 14:39 -0800, Eric Biggers wrote:
> > On Tue, Dec 27, 2022 at 03:27:40PM +0100, Roberto Sassu wrote:
> > > From: Roberto Sassu <roberto.sassu@huawei.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@vger.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@kernel.org>
> > > Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
> > > ---
> > > crypto/asymmetric_keys/public_key.c | 38 ++++++++++++++++-------------
> > > 1 file changed, 21 insertions(+), 17 deletions(-)
> >
> > Reviewed-by: Eric Biggers <ebiggers@google.com>
>
> Hi David
>
> could you please take this patch in your repo, if it is ok?

Kindly ask your support here. Has this patch been queued somewhere?
Wasn't able to find it, also it is not in linux-next.

Thanks

Roberto

\
 
 \ /
  Last update: 2023-03-27 00:16    [W:0.105 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site