[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrX-YYp5iXPLKOpiT9+3DXYxGTVRXVyPN0oiYpQQC8kH3w@mail.gmail.com>
Date: Tue, 13 Dec 2016 18:53:03 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Andy Lutomirski <luto@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
David Howells <dhowells@...hat.com>, keyrings@...r.kernel.org,
Eric Biggers <ebiggers3@...il.com>,
linux-crypto@...r.kernel.org,
Herbert Xu <herbert@...dor.apana.org.au>,
Stephan Mueller <smueller@...onox.de>
Subject: Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs
On Tue, Dec 13, 2016 at 6:48 PM, Andy Lutomirski <luto@...nel.org> wrote:
> The driver put a constant buffer of all zeros on the stack and
> pointed a scatterlist entry at it in two places. This doesn't work
> with virtual stacks. Use ZERO_PAGE instead.
Wait a second...
> - sg_set_buf(&sg_out[1], pad, sizeof pad);
> + sg_set_buf(&sg_out[1], empty_zero_page, 16);
My fix here is obviously bogus (I meant to use ZERO_PAGE(0)), but what
exactly is the code trying to do? The old code makes no sense. It's
setting the *output* buffer to zeroed padding.
--Andy
Powered by blists - more mailing lists