From: Stephan Mueller Date: Fri, 13 Mar 2015 10:44:07 +0000 (+0100) Subject: crypto: algif_rng - zeroize buffer with random data X-Git-Tag: v4.14-rc1~5591^2~82 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ef4d5c43de945b7c78454eac63e5f4fe68f82fc;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Herbert Xu --- diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c index 67f612c..a346173 100644 --- a/crypto/algif_rng.c +++ b/crypto/algif_rng.c @@ -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; }