Home GnuPG

sha256-avx2: fix reading beyond end of input buffer

Description

sha256-avx2: fix reading beyond end of input buffer

* cipher/sha256-avx2-bmi2-amd64.S
(_gcry_sha256_transform_amd64_avx2): Use 'last block' code path if
input length is only one block.
* tests/basic.c (check_one_md_final): Use dynamic allocated buffer
so that in future similar access errors get detected by
tests/basic + valgrind.
  • Reported-by: Guido Vranken <guidovranken@gmail.com>
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Feb 3 2021, 5:11 PM
Parents
rC289543544e41: ecc-ecdh: fix memory leak
Branches
Unknown
Tags
Unknown