OK, so here's the patch to the bug in question:
http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/hash...
+ /* The state and buffer size are driven by SHA256, not by SHA224. */
memcpy(context->state, sha224_initial_hash_value,
- (size_t)(SHA224_DIGEST_LENGTH));
- memset(context->buffer, 0, (size_t)(SHA224_BLOCK_LENGTH));
+ (size_t)(SHA256_DIGEST_LENGTH));
+ memset(context->buffer, 0, (size_t)(SHA256_BLOCK_LENGTH));
The NetBSD code was confused about
which algorithm it was implementing. This can hardly be used to generalize about vulnerabilities in specific NIST approved algorithms.
You're just wrong about this point, Marsh. You are very smart and often right, but not invariably so.
So even if we allow this example as meeting my test of similar vulnerabilities introduced by implementation flaws of any NIST (or even IETF) defined algorithms I can still claim that this bug that existed in NetBSD only for 3 months in the spring of 2009 is the exception which proves the rule.
It doesn't compare at all in scope to http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2483 in terms of the length of time, number of systems affected, or number of credentials created with weak cypto.
EDIT: Sorry, I'm looking at the wrong patch. It appears that at the time indicated in the advisory, a bunch of other stuff was added to the source tree.
Either I'm missing something obvious or there's a bit of misdirection going on. For example, it says: *"The overflow occurs at the time the hash init function is called (e.g.
SHA256_Init). The init functions then pass the wrong size for the context as an argument to the memset function which then overwrites 4 bytes of the memory buffer located after the one holding the context." and "fixed: NetBSD-4 branch: Jul 22, 2009"
But the diffs of 2009-07-22 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/sha2.h.diff?... http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/hash... don't seem to affect the memset call in SHA256_Init() at all or the size of the structure.