Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MDEV-31585] Stop trusting or relying on client identifying informati…
…on sent prior to the TLS handshake The server has heretofore improperly mishandled—and TRUSTED—information sent in the plaintext login request packet sent prior to the TLS handshake. As a result of this, the client is *forced* to send excessive and exploitable identifying information in the pre-TLS-handshake plaintext login packet. That client-side vulnerability is CONC-654. This modifies the server to stop relying on any of the information in the pre-TLS-handshake plaintext login packet EXCEPT for the single bit that tells it that a TLS handshake will follow. It furthermore adds a capability bit to the server greeting packet, which informs the client that it is safe to send a bare-bones dummy packet containing ONLY the instruction that a TLS handshake will follow: /* This capability is set if: * * - The CLIENT knows how to send a truncated 2-byte SSLRequest * packet, containing no information other than the CLIENT_SSL flag * which is necessary to trigger the TLS handshake, and to send its * complete capability flags and other identifying information after * the TLS handshake. * - The SERVER knows how to receive this truncated 2-byte SSLRequest * packet, and to receive the client's complete capability bits * after the TLS handshake. * */ #define CLIENT_CAN_SSL_V2 (1ULL << 37) Because the client cannot safely send the SSL_V2 SSLRequest packet unless the server has advertised support for it in its (plaintext) Server Greeting packet, an active MITM could strip the CLIENT_CAN_SSL_V2 bit from that Server Greeting packet. This downgrade attack will force the client to continue exhibiting the CONC-654 vulnerability. The server is also modified to detect this case and abort the connection; this won't fix the one-time client information leakage of the CONC-654 vulnerability, but it is intended to discourage the MITM attack by making it highly visible. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
- Loading branch information