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

Fix CVE-2024-4741 for branch 8.3 #632

Merged

Conversation

dongbeiouba
Copy link
Member

Checklist
  • https://yuque.com/tsdoc 增加或更新了必要的文档
  • 增加或更新了必要的测试用例
  • 对于重要修改,更新了CHANGES文件
  • 当前修改存在对已有API参数或返回值的改变
  • 当前修改存在对旧版本功能的兼容性改变(如网络协议或密码算法)

If we're part way through processing a record, or the application has
not released all the records then we should not free our buffer because
they are still needed.

CVE-2024-4741
In order to ensure we do not have a UAF we reset the rlayer.packet pointer
to NULL after we free it.

CVE-2024-4741
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741
The sslapitest has a helper function to load the dasync engine which is
useful for testing pipelining. We would like to have the same facility
from sslbuffertest, so we move the function to the common location
ssltestlib.c

Follow on from CVE-2024-4741
@dongbeiouba dongbeiouba added bug Something isn't working branch-8.3 labels Jun 26, 2024
@dongbeiouba dongbeiouba requested review from InfoHunter, uudiin, wa5i, zzl360 and a team June 26, 2024 03:35
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741
TLS pipelining provides the ability for libssl to read or write multiple
records in parallel. It requires special ciphers to do this, and there are
currently no built-in ciphers that provide this capability. However, the
dasync engine does have such a cipher, so we add a test for this capability
using that engine.
…lled

The pipeline input/output buf arrays must remain accessible to the
EVP_CIPHER_CTX until EVP_Cipher is subsequently called. This fixes an
asan error discovered by the newly added pipeline test.
During read pipelining we must ensure that the buffer is sufficiently large
to read enough data to fill our pipelines. We also remove some code that
moved data to the start of the packet if we can. This was unnecessary
because of later code which would end up moving it anyway. The earlier move
was also incorrect in the case that |clearold| was 0. This would cause the
read pipelining code to fail with sufficiently large records.
We shouldn't be putting more data into a pipeline than the value of
split_send_fragment.
@InfoHunter InfoHunter merged commit 4cabfa7 into Tongsuo-Project:8.3-stable Jul 1, 2024
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-8.3 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants