what is openssl even about bro
RE: https://mastox.eu/@thecybersecguru/117655213373838502
🚨 BREAKING: OPENSSL 4.1 CHANGED HOW TLS CERTIFICATES ARE VERIFIED, AND CURL STARTED ACCEPTING CERTIFICATES IT PREVIOUSLY REJECTED
Researchers showed curl 8.23.0 built against OpenSSL 4.1.0 accepts a certificate issued outside a CA's permitted DNS namespace. The same test fails on OpenSSL 4.0.2.
curl's verification code didn't change. OpenSSL dropped an old Common Name (CN) constraint check, and that left a gap between how the library validates the chain and how curl checks the hostname.
Daniel Stenberg, curl's creator, has publicly criticised the change. OpenSSL maintainers say the new behaviour follows the RFCs.
Exploiting it takes a trusted CA chain, a constrained intermediate certificate and curl's legacy hostname verification, so it's far from a universal TLS bypass. curl is working on removing its CN fallback.
Writeup, PoC and the OpenSSL vs curl argument: https://thecybersecguru.com/news/openssl-4-1-curl-name-constraints-bypass/
> Curl is calling the openssl verifier with no reference name at all. i.e. there is no name to check. The documentation of X509_verify_cert(3) says that if you do this, no name checks are made. It calls this with the default set of verification flags.
afaict curl was misusing the api for 20 years, it just never became an issue til now; which was a change made to make openssl spec compliant:
> OpenSSL does check the name constraints when called with no reference identifier - but as mentioned in the CHANGES.md entry for 4.1 this has become spec compliant and will NOT check the CN unless you use X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
CHANGES.md —