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

Incorrect use of the BIO mem ptr buffer #12763

Closed
t8m opened this issue Jun 10, 2019 · 1 comment · Fixed by #12773 or #12802
Closed

Incorrect use of the BIO mem ptr buffer #12763

t8m opened this issue Jun 10, 2019 · 1 comment · Fixed by #12773 or #12802
Labels
Milestone

Comments

@t8m
Copy link
Contributor

t8m commented Jun 10, 2019

The line:

stream->dnstls_data.write_buffer->data += ss;

is wrong. The code worked with OpenSSL 1.1.x only by accident. It would not work with 1.0.x and it does not work with 1.1.1c version anymore - see openssl/openssl#9119

The code needs to keep the data pointer intact and move the rest of the non-written data in the place (BTW, this is not less efficient as the memmove was done by OpenSSL anyway in the older 1.1.1 releases where this worked.)

Or avoid the direct work with the BUF_MEM from the write BIO completely and use BIO_read() to get the data from the memory BIO.

@keszybz
Copy link
Member

keszybz commented Jun 11, 2019

A patch would be great ;)

@keszybz keszybz added this to the v243 milestone Jun 11, 2019
t8m added a commit to t8m/systemd that referenced this issue Jun 11, 2019
t8m added a commit to t8m/systemd that referenced this issue Jun 11, 2019
yuwata pushed a commit that referenced this issue Jun 12, 2019
irtimmer added a commit to irtimmer/systemd that referenced this issue Jun 15, 2019
Fix crash when using OpenSSL 1.1.1c
Fixes: systemd#12763
irtimmer added a commit to irtimmer/systemd that referenced this issue Jun 15, 2019
Fix crash when using OpenSSL 1.1.1c
Fixes: systemd#12763
edevolder pushed a commit to edevolder/systemd that referenced this issue Jun 26, 2019
edevolder pushed a commit to edevolder/systemd that referenced this issue Jun 26, 2019
Fix crash when using OpenSSL 1.1.1c
Fixes: systemd#12763
edevolder pushed a commit to edevolder/systemd that referenced this issue Jun 26, 2019
edevolder pushed a commit to edevolder/systemd that referenced this issue Jun 26, 2019
Fix crash when using OpenSSL 1.1.1c
Fixes: systemd#12763
zachsmith pushed a commit to zachsmith/systemd that referenced this issue Jul 26, 2019
zachsmith pushed a commit to zachsmith/systemd that referenced this issue Jul 26, 2019
Fix crash when using OpenSSL 1.1.1c
Fixes: systemd#12763
vbatts pushed a commit to kinvolk/systemd that referenced this issue Nov 12, 2020
Fix crash when using OpenSSL 1.1.1c
Fixes: systemd#12763

(cherry picked from commit ab8cd6c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants