mailing list archives
possible backdoor in OpenSSL X509 verification
From: Arnis <arnis () ut ee>
Date: Fri, 06 Sep 2013 17:28:34 +0300
Can someone take a look on this shady X.509 certificate verification code
(fails open in case of out-of-memory error):
"Certificate chain verification in crypto/x509/x509_vfy.c
X509_verify_cert() fails badly and may allow verification bypass if
check_issued() on line 259 returns false negative on check whether the last
certificate in chain is self signed. For example, check_issued() may
return false negative in case of memory allocation failure (although could
not find how to force that).
253 /* Examine last certificate in chain and see if it
254 * is self signed.
259 if (ctx->check_issued(ctx, x, x))
This is because "for" loop later does not require to find even a single
issuer certificate from trust store and will happily break loop if last
certificate is actually self signed."
Noone from OpenSSL team has commented whether this is exploitable or
should it be rewritten in safer manner.
P.S. Subject field inspired by latest NSA stories ;)
Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia - http://secunia.com/
- possible backdoor in OpenSSL X509 verification Arnis (Sep 06)