Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1541760
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs |
| Date | 2016-12-14 09:40 +0100 |
| Message-ID | <sOdgu-4cB-17@gated-at.bofh.it> (permalink) |
| References | <sO877-14y-11@gated-at.bofh.it> <sO7NL-J9-3@gated-at.bofh.it> <sO877-14y-11@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
Andy Lutomirski <luto@amacapital.net> wrote: > > - 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. Padding goes into the encrypt function and is going to come out of the decrypt function. Possibly derived_key_decrypt() should be checking that the padding that comes out is actually a bunch of zeros. Maybe we don't actually need to get the padding out, but I'm not sure whether the crypto layer will malfunction if we don't give it a buffer for the padding. David
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs Andy Lutomirski <luto@kernel.org> - 2016-12-14 03:50 +0100
Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs Andy Lutomirski <luto@amacapital.net> - 2016-12-14 04:10 +0100
Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-14 06:10 +0100
Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs Eric Biggers <ebiggers3@gmail.com> - 2016-12-14 09:20 +0100
Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs David Howells <dhowells@redhat.com> - 2016-12-14 09:40 +0100
Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs Andy Lutomirski <luto@amacapital.net> - 2016-12-14 17:30 +0100
Re: [PATCH v2] keys/encrypted: Fix two crypto-on-the-stack bugs David Howells <dhowells@redhat.com> - 2016-12-14 18:10 +0100
csiph-web