Skip to contentSkip to conversation

crypto: algif_rng - zeroize buffer holding random data

PATCH Superseded Stephan Mueller 2 participants 2 messages Mar 11, 2015 – Mar 13, 2015 Crypto API

lore
Share & tools
lore
#0 lore raw

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.

---
 crypto/algif_rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/algif_rng.c +0 -0
index 67f612c..a346173 100644
@@ -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
maintainer
#1 lore raw
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.

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