[openssl-dev] [openssl.org #4063] Client Hello longer than 2^14 bytes are rejected
Alessandro Ghedini via RT
rt at openssl.org
Fri Sep 25 13:55:56 UTC 2015
On Fri, Sep 25, 2015 at 01:20:12pm +0000, Hubert Kario via RT wrote:
> Current OpenSSL-1.0.1, 1.0.2 as well as state-machine-rewrite branches
> reject Client Hello messages bigger than 2^14+4 bytes.
IIRC SSLv3 does place the limit at 2^14 or so bytes, so I think the problem is
that OpenSSL only checks for that.
AFAICT both SSLv3 and TLS implementations share the same ssl_accept() method
(that is ssl3_accept()), which calls e.g. ssl3_get_client_key_exchange() which
in turn calls the ssl_get_message() method (implemented by ssl3_get_message())
using SSL3_RT_MAX_PLAIN_LENGTH as maximum size.
I think a proper fix would be to have all the ssl_get_message() calls changed
to use the proper "max" parameter depending on the protocol version.
The above applies to current master, I haven't checked the state machine
rewrite branch yet.
I can look into preparing a patch, if no one beats me to it.
Cheers
More information about the openssl-dev
mailing list