crypto: algif_rng - zeroize buffer with random data
PATCH RESEND 1/1 crypto: algif_rng - zeroize buffer with 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 +1 -1
@@ -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
Quoted 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]>
Applied.
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