summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/Makefile
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2024-05-09 21:59:21 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2024-05-17 18:55:07 +0800
commit196eca8607cf9dc44c8b17d0c66619afa0a841cd (patch)
treeb462f9da8752ae4a9b22fa73db46c2d3efbc41ae /crypto/asymmetric_keys/Makefile
parentf8449cd38c515395ea44f0347750113fc002717d (diff)
downloadlinux-crypto-196eca8607cf9dc44c8b17d0c66619afa0a841cd.tar.gz
linux-crypto-196eca8607cf9dc44c8b17d0c66619afa0a841cd.zip
crypto: ecc - Prevent ecc_digits_from_bytes from reading too many bytes
Prevent ecc_digits_from_bytes from reading too many bytes from the input byte array in case an insufficient number of bytes is provided to fill the output digit array of ndigits. Therefore, initialize the most significant digits with 0 to avoid trying to read too many bytes later on. Convert the function into a regular function since it is getting too big for an inline function. If too many bytes are provided on the input byte array the extra bytes are ignored since the input variable 'ndigits' limits the number of digits that will be filled. Fixes: c95f28e4efbe ("crypto: ecdsa - Convert byte arrays with key coordinates to digits") Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/asymmetric_keys/Makefile')
0 files changed, 0 insertions, 0 deletions