Skip to content

Comments

Fix SSL_key_update() problems (1.1.1)#16098

Closed
mattcaswell wants to merge 2 commits intoopenssl:OpenSSL_1_1_1-stablefrom
mattcaswell:key-update-read-111
Closed

Fix SSL_key_update() problems (1.1.1)#16098
mattcaswell wants to merge 2 commits intoopenssl:OpenSSL_1_1_1-stablefrom
mattcaswell:key-update-read-111

Conversation

@mattcaswell
Copy link
Member

This is a backport of #16077 to 1.1.1

Sometimes this function gets called when the buffers have already been
set up. If there is already a partial packet in the read buffer then the
packet pointer will be set to an incorrect value. The packet pointer already
gets reset to the correct value when we first read a packet anyway, so we
don't also need to do it in ssl3_setup_read_buffer.

Fixes openssl#13729
If an application is halfway through writing application data it should
not be allowed to attempt an SSL_key_update() operation. Instead the
SSL_write() operation should be completed.

Fixes openssl#12485
@mattcaswell mattcaswell added approval: review pending This pull request needs review by a committer branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) labels Jul 16, 2021
@mattcaswell mattcaswell requested review from kaduk and t8m July 16, 2021 10:44
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Jul 16, 2021
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Jul 17, 2021
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request Jul 19, 2021
Sometimes this function gets called when the buffers have already been
set up. If there is already a partial packet in the read buffer then the
packet pointer will be set to an incorrect value. The packet pointer already
gets reset to the correct value when we first read a packet anyway, so we
don't also need to do it in ssl3_setup_read_buffer.

Fixes #13729

Reviewed-by: Ben Kaduk <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16098)
openssl-machine pushed a commit that referenced this pull request Jul 19, 2021
If an application is halfway through writing application data it should
not be allowed to attempt an SSL_key_update() operation. Instead the
SSL_write() operation should be completed.

Fixes #12485

Reviewed-by: Ben Kaduk <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16098)
@t8m
Copy link
Member

t8m commented Jul 19, 2021

Merged to 1.1.1. Thank you.