Maybe they used some in-place HTTP parser and that's why they didn't have zero-termination to use strcmp.
And btw, it's not clear if the code was C to begin with. I believe large chunk of ME firmware is said to be written in Java, which kinda makes sense for a network facing system considering how shitty string.h is.
It would be interesting if somebody found that they are using some COTS webserver, C/Java - doesn't matter, and see if there are some CVEs for it.
(Btw. there are many smaller Java VMs for stuff like Java Card and JEFF)
Few years ago somebody published analysis of the ME firmware for servers (desktop version was compressed with unknown algorithm). I'm sure you can google this for details.
> the fact that the issue was with strncmp
But we don't know for sure if it was strncmp. It's a logic bug, which can be implemented in any language. But again, maybe this server runs outside JVM and is written in C.
[0] https://en.wikipedia.org/wiki/Digest_access_authentication
In HTTP everything is a string.
> Using a proper cryptography library also might have saved them from using MD5.
HTTP, again. Browser sends MD5 whether you like it or not.
Once you parse it out of HTTP it is no longer as string (or at least it should no longer be a string).
>HTTP, again. Browser sends MD5 whether you like it or not.
They are quite clearly doing verification themselves. They can use whatever algorithm they want.
Also, fixed length hashes aren't strings. They shouldn't use the same functions as strings.
Edit: Using a proper cryptography library also might have saved them from using MD5. At the very least, most modern libraries have a warning that is is deprecated and should not be used for new projects.