Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression and empty blocks #23

Closed
pjbakker opened this issue Jun 25, 2013 · 1 comment
Closed

Compression and empty blocks #23

pjbakker opened this issue Jun 25, 2013 · 1 comment
Labels

Comments

@pjbakker
Copy link
Contributor

It seems socat likes to send empty blocks which causes zlib to punt.

To reproduce, run this on a test-server:

socat OPENSSL-LISTEN:5555,verify=0,key=test.key,cert=test.crt STDOUT

Connect to this with a polarssl client. Sending from polar to socat works fine. Just hitting enter on the socat end will make the connection fail on the PolarSSL side with a compression error.

I tracked that down to ssl_decompress_buf() being called with an empty block.
The zlib will return an error in that case.

Putting

if( !len_pre ) return ( 0 );

near the top of ssl_compress_buf() and ssl_decompress_buf() fixes that.

Versions:

  • client: PolarSSL 1.2.7 with zlib 1.2.8
  • server: socat 1.7.1.3 with openssl 1.0.0e-2ubuntu4.7
@ghost ghost assigned pjbakker Jun 25, 2013
@pjbakker
Copy link
Contributor Author

Fixed in development / 1.3 branch in abf2f8f

@pjbakker pjbakker removed their assignment Feb 21, 2015
gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Sep 5, 2017
…-certs

Generate test data for the Charon TLS configuration
gilles-peskine-arm pushed a commit to gilles-peskine-arm/mbedtls that referenced this issue Mar 1, 2019
Update usage of PSA ITS to comply with v1.0
iameli pushed a commit to livepeer/mbedtls that referenced this issue Dec 5, 2023
Take buffer overflow pull requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant