crypto: algif_rng - zeroize buffer holding random data
PATCH 1/1 crypto: algif_rng - zeroize buffer holding random data
Due to the change to RNGs to always return zero in success case, the RNG interface must zeroize the buffer with the length provided by the caller.
Signed-off-by Stephan Mueller <[email protected]>
--- crypto/algif_rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/algif_rng.c +0 -0
@@ -87,7 +87,7 @@ static int rng_recvmsg(struct kiocb *unused, struct socket
*sock,
return genlen;
err = memcpy_to_msg(msg, result, len);
- memzero_explicit(result, genlen);
+ memzero_explicit(result, len);
return err ? err : len;
}
Signature · 1 line
2.1.0
Herbert Xu
maintainerQuoted 5 lines · Stephan Mueller
Due to the change to RNGs to always return zero in success case, the RNG interface must zeroize the buffer with the length provided by the caller.
Signed-off-by Stephan Mueller <[email protected]>
Your patch is line-wrapped and doesn't apply. Please resend.
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt