
Bugtraq mailing list archives
Re: When scrubbing secrets in memory doesn't work
From: Michael Zimmermann <zim () vegaa de>
Date: Fri, 8 Nov 2002 17:23:34 +0100
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At Dienstag, 5. November 2002 23:13 Michael Howard wrote:
During the Windows Security Push in Feb/Mar 2002, we noticed an 'interesting' anomaly with code to scrub passwords that looks like this: bool DoSensitiveStuff() { bool fOK = false; const size_t cbPwd = 64; char szPwd[cbPwd]; if (GetUserPassword(szPwd,cbPwd-1)) if (DoSomethingWithPassword(szPwd)) fOK = true; memset(szPwd,0,cbPwd); return fOK; }
Not to declare the intermediate storage for sensitive data as 'volatile' is a coding flaw. An esily overlooked one, yes, but nevertheless... Like forgetting to protect critical code with semaphores. - -- Michael Zimmermann (http://vegaa.de) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9y+UG72vu22ltWBERAqduAJ0YGSuDIWmU1boNIq/BFObDfSxi8gCfV3Si R07sgLDQFqsZ8Rz2xVclOA0= =2qe3 -----END PGP SIGNATURE-----
Current thread:
- When scrubbing secrets in memory doesn't work Michael Howard (Nov 05)
- Re: When scrubbing secrets in memory doesn't work Perry E. Metzger (Nov 05)
- Re: When scrubbing secrets in memory doesn't work Andy Polyakov (Nov 07)
- Re: When scrubbing secrets in memory doesn't work Gianni Tedesco (Nov 07)
- Re: When scrubbing secrets in memory doesn't work Valdis . Kletnieks (Nov 08)
- Re: When scrubbing secrets in memory doesn't work Michael Zimmermann (Nov 09)
- Re: When scrubbing secrets in memory doesn't work Jan Echternach (Nov 14)
- <Possible follow-ups>
- When scrubbing secrets in memory doesn't work Michael Howard (Nov 09)
- RE: When scrubbing secrets in memory doesn't work Michael Wojcik (Nov 12)
- RE: When scrubbing secrets in memory doesn't work Michael Wojcik (Nov 17)
- Re: When scrubbing secrets in memory doesn't work Nicholas Weaver (Nov 18)
- Re: When scrubbing secrets in memory doesn't work Richard Moore (Nov 20)
- Re: When scrubbing secrets in memory doesn't work Florian Weimer (Nov 18)
- Re: When scrubbing secrets in memory doesn't work Peter Watkins (Nov 19)
- Re: When scrubbing secrets in memory doesn't work Nicholas Weaver (Nov 18)
- Re: When scrubbing secrets in memory doesn't work Perry E. Metzger (Nov 05)