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

Only free the read buffers if we're not using them (3.1/3.0) #24395

Closed
wants to merge 7 commits into from

Conversation

mattcaswell
Copy link
Member

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

wbl and others added 5 commits May 14, 2024 15:20
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
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741
@mattcaswell mattcaswell added approval: review pending This pull request needs review by a committer approval: otc review pending This pull request needs review by an OTC member severity: urgent Fixes an urgent issue (exempt from 24h grace period) branch: 3.0 Merge to openssl-3.0 branch branch: 3.1 Merge to openssl-3.1 tests: present The PR has suitable tests present labels May 14, 2024
@mattcaswell mattcaswell changed the title Only free the read buffers if we're not using them Only free the read buffers if we're not using them (3.1/3.0) May 14, 2024
@mattcaswell
Copy link
Member Author

Backport to 3.1/3.0 of #24394

@t8m t8m added triaged: bug The issue/pr is/fixes a bug severity: important Important bugs affecting a released version and removed severity: urgent Fixes an urgent issue (exempt from 24h grace period) labels May 14, 2024
@t8m t8m removed the approval: otc review pending This pull request needs review by an OTC member label May 14, 2024
@t8m t8m requested a review from nhorman May 16, 2024 16:17
@mattcaswell mattcaswell added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: review pending This pull request needs review by a committer labels May 27, 2024
@mattcaswell
Copy link
Member Author

Pushed to 3.1/3.0. Thanks.

openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #24395)

(cherry picked from commit 704f725)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
In order to ensure we do not have a UAF we reset the rl->packet pointer
to NULL after we free it.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)

(cherry picked from commit 38690ca)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
In order to ensure we do not have a UAF we reset the rl->packet pointer
to NULL after we free it.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)

(cherry picked from commit bfb8128)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)

(cherry picked from commit 566f306)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)

(cherry picked from commit 0575247)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)

(cherry picked from commit c1bd38a)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
openssl-machine pushed a commit that referenced this pull request May 28, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #24395)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 704f725)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 4238abc)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 4238abc)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 4238abc)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 4238abc)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 6972d5a)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 2, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 6972d5a)
jvdsn pushed a commit to jvdsn/openssl that referenced this pull request Jun 3, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)
jvdsn pushed a commit to jvdsn/openssl that referenced this pull request Jun 3, 2024
In order to ensure we do not have a UAF we reset the rl->packet pointer
to NULL after we free it.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)
jvdsn pushed a commit to jvdsn/openssl that referenced this pull request Jun 3, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)
jvdsn pushed a commit to jvdsn/openssl that referenced this pull request Jun 3, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)
jvdsn pushed a commit to jvdsn/openssl that referenced this pull request Jun 3, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 4, 2024
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

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 704f725)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 4, 2024
Test that attempting to free the buffers at points where they should not
be freed works as expected.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 4238abc)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 4, 2024
We extend the testing to test what happens when pipelining is in use.

Follow on from CVE-2024-4741

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#24395)

(cherry picked from commit 6972d5a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: 3.0 Merge to openssl-3.0 branch branch: 3.1 Merge to openssl-3.1 severity: important Important bugs affecting a released version tests: present The PR has suitable tests present triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants