maskit opened a new pull request, #14093: URL: https://github.com/apache/trafficserver/pull/14093
## Summary Under `verify_server_policy: PERMISSIVE`, an origin connection that presented a raw public key (RFC 7250) could continue past a failed check and then go into the session pool. A later request verified under `ENFORCED` could take that connection, although a new handshake for that request would have refused the key. The failed checks that can do this are: - a `TS_SSL_VERIFY_SERVER_HOOK` plugin rejecting the key; - with OpenSSL, a key below the security level; - a key outside the pinned set, once a reload adds that key to the set. sni.yaml already said such a connection never carries an `ENFORCED` request. Fixes: #13983 ## Change A connection now carries an `ENFORCED` request only if its handshake passed every check and its key is in the set that request would pin. This applies to a connection taken from the session pool and to an HTTP/2 connection shared with requests that waited for it to open, and holds when the connection resumed the session of an earlier one. A connection that failed a check stays out even after a reload adds its key to the set. `PERMISSIVE` and `DISABLED` requests may still use the connection, since a new handshake would accept the key for them anyway. The handshake records the failure in its verify result, which a resumed session keeps: - **OpenSSL:** the verify callback keeps a failure that `PERMISSIVE` only warned about, and restores it after the pin decision, so a key that matches the set doesn't erase it. - **BoringSSL:** the custom verify callback continues past a failure by switching the connection to `SSL_VERIFY_NONE` and returning `ssl_verify_invalid`, so BoringSSL records `X509_V_ERR_APPLICATION_VERIFICATION`. One visible side effect: on BoringSSL, `traffic_dump` records `proxy-verify-mode` as 0 for an origin connection that `PERMISSIVE` carried past a failed raw public key check, since it reads `SSL_get_verify_mode()`. ## Testing `tests/uranium_tests/tls/test_tls_rpk_hop.py` adds: - a pooled connection that passed every check under `PERMISSIVE` carrying an `ENFORCED` request; - a pooled connection carried past a weak key (OpenSSL only) or a hook rejection, refused for an `ENFORCED` request; - a pooled connection whose key was outside the set, refused for an `ENFORCED` request after a reload adds the key, with the set in sni.yaml and in records.yaml. Each runs over TLS 1.3 and 1.2, with the pooled connection from a full handshake and from a resumed one. All 70 tests in the file pass, with these skips: - **BoringSSL:** the 4 weak key cases, since it has no security level to hold the key below. - **OpenSSL 3.6:** the weak key case over TLS 1.2 with a resumed session, since security level 3 disables TLS 1.2 session tickets. The HTTP/2 shared connection path calls the same check as the session pool but has no test of its own. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
