Re:Memcmp being wrongly stripped like strcmp
by segfaultbuserr on Friday October 09, 2020 @02:25AM
(#24727371)
> The miscompilation of the implementation of draft-brezak-win2k-krb-rc4-hmac-04.txt seemed interesting to me and potentially of a security concern.
Fortunately, this ancient and deprecated [0] authentication protocol from Windows 2000 is uncommon today. AES-HMAC is used since Windows Vista.
[0] https://web.mit.edu/kerberos/krb5-devel/doc/admin/enctypes.h...
The miscompilation of the implementation of draft-brezak-win2k-krb-rc4-hmac-04.txt seemed interesting to me and potentially of a security concern. They looked to me like they were potentially significantly reducing the length of the message integrity check in an authentication protocol.
https://github.com/heimdal/heimdal/blob/7ae2dfd853c87f9cbecb...
https://github.com/heimdal/heimdal/blob/7ae2dfd853c87f9cbecb...
https://github.com/heimdal/heimdal/blob/7ae2dfd853c87f9cbecb...
Though its hard to say for sure without even a passing familiarity with that protocol or its implementation. If you wanted to go vulnerability hunting, however, that is where I'd start.
That said, even if there is a bug that is no evidence that it would have been intentional. Sadly, an intentionally introduced bug could be absurdly subtle. One of the downsides of software bugs being relatively common is that you can't be sure if a bug was intentional or not... and at the same time it's silly to assume one was intentional because we know that real bugs are so common.
It's long been my view that if you're not occasionally finding compiler bugs -- even in somewhat older compilers-- you're just not testing hard enough. They've become more rare but are not so rare that a single developer comprehensively testing a small library won't eventually find one (or more). (Libsecp256k1 is ~9,964 lines of code and ~8,235 lines of test code).
Many other cases found by Russell's system wide recompilation were also in test cases or were otherwise pretty obviously not that big of a deal.