aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAndrew Lutomirski <[email protected]>2017-01-10 15:24:46 -0800
committerHerbert Xu <[email protected]>2017-01-13 00:26:45 +0800
commite93acd6f6778825a4e0b5a1a9b70324bf901d516 (patch)
tree7be6dcc962f1b596b3d0ad6ed3e34439c71fae91 /tools/perf/scripts/python
parentf283148a0774e9b2de5ae4b42bb7dff50410f8cc (diff)
crypto: testmgr - Allocate only the required output size for hash tests
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 <[email protected]> Cc: Herbert Xu <[email protected]> Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions