google / google-authenticator-libpam

Apache License 2.0
1.77k stars 281 forks source link

Zero out hmac ctx when exiting function like other internal data structures #94

Closed tristanmillerjumpcloud closed 6 years ago

tristanmillerjumpcloud commented 6 years ago

This explicitly clears the ctx datastructure when generating an hmac, from which the time based authentication is derived. Its generated keys are already cleared out of the stack as a defense in depth technique, but this clears the intermediate results that the keys are derived from as well.

googlebot commented 6 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers