Messages in this thread | | | From | Andy Lutomirski <> | Date | Wed, 11 Jan 2017 23:52:03 -0800 | Subject | Re: [PATCH v2 8/8] crypto/testmgr: Allocate only the required output size for hash tests |
| |
On Wed, Jan 11, 2017 at 11:47 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote: > Andy Lutomirski <luto@kernel.org> wrote: >> There are some hashes (e.g. sha224) that have some internal trickery >> to make sure that only the correct number of output bytes are >> generated. If something goes wrong, they could potentially overrun >> the output buffer. >> >> Make the test more robust by allocating only enough space for the >> correct output size so that memory debugging will catch the error if >> the output is overrun. >> >> Tested by intentionally breaking sha224 to output all 256 >> internally-generated bits while running on KASAN. >> >> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> Cc: Herbert Xu <herbert@gondor.apana.org.au> >> Signed-off-by: Andy Lutomirski <luto@kernel.org> > > This patch doesn't seem to depend on anything else in the series. > Do you want me to take it separately?
Yes, please. Its only relation to the rest of the series is that I wanted to make sure that I didn't mess up sha224's finalization code.
--Andy
| |