diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2025-11-10 14:54:38 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-11-22 10:04:49 +0800 |
| commit | e9eb52037a529fbb307c290e9951a62dd728b03d (patch) | |
| tree | 39f483cc6565c43ae762707b205eb2503fb07646 /scripts/lib/abi/helpers.py | |
| parent | 76ce17f6f7f78ab79b9741388bdb4dafa985b4e9 (diff) | |
crypto: starfive - Correctly handle return of sg_nents_for_len
The return value of sg_nents_for_len was assigned to an unsigned long
in starfive_hash_digest, causing negative error codes to be converted
to large positive integers.
Add error checking for sg_nents_for_len and return immediately on
failure to prevent potential buffer overflows.
Fixes: 7883d1b28a2b ("crypto: starfive - Add hash and HMAC support")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'scripts/lib/abi/helpers.py')
0 files changed, 0 insertions, 0 deletions
