lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 06 Sep 2013 17:28:34 +0300
From: Arnis <arnis@...ee>
To: full-disclosure@...ts.grok.org.uk
Subject: possible backdoor in OpenSSL X509 verification

Can someone take a look on this shady X.509 certificate verification code
(fails open in case of out-of-memory error):

http://rt.openssl.org/Ticket/Display.html?id=2924

"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.
255 */
256
257 i=sk_X509_num(ctx->chain);
258 x=sk_X509_value(ctx->chain,i-1);
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.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Powered by blists - more mailing lists