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 a possible memory leak in sxnet_v2i #23234

Closed

Conversation

bernd-edlinger
Copy link
Member

When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

Checklist
  • documentation is added or updated
  • tests are added or updated

When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.
@bernd-edlinger bernd-edlinger added branch: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch branch: 3.1 Merge to openssl-3.1 branch: 3.2 Merge to openssl-3.2 labels Jan 8, 2024
@t8m t8m added approval: review pending This pull request needs review by a committer triaged: bug The issue/pr is/fixes a bug tests: exempted The PR is exempt from requirements for testing labels Jan 8, 2024
@nhorman
Copy link
Contributor

nhorman commented Jan 8, 2024

I believe this is a duplicate of #23211

@t8m
Copy link
Member

t8m commented Jan 9, 2024

I believe this is a duplicate of #23211

I do not think it is.

@mattcaswell mattcaswell 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 Jan 9, 2024
@bernd-edlinger
Copy link
Member Author

Hmm, while trying to add a test case I hit another incredibly stupid memory leak....

Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.
@bernd-edlinger
Copy link
Member Author

Okay, I added a test case, and fixed the other memory leak too.
Please reconfirm.

Thanks!

Copy link
Member

@mattcaswell mattcaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reconfirm

@mattcaswell mattcaswell added approval: review pending This pull request needs review by a committer and removed approval: done This pull request has the required number of approvals labels Jan 9, 2024
@t8m t8m added tests: present The PR has suitable tests present and removed tests: exempted The PR is exempt from requirements for testing labels Jan 9, 2024
@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 Jan 9, 2024
@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 Jan 10, 2024
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23234)
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23234)
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
@t8m
Copy link
Member

t8m commented Jan 10, 2024

Merged to the master, 3.2, 3.1, and 3.0 branches. Thank you for your contribution.

@t8m t8m closed this Jan 10, 2024
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
openssl-machine pushed a commit that referenced this pull request Jan 10, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

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

(cherry picked from commit 0151e77)
bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this pull request Jan 11, 2024
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

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

(cherry picked from commit 3980118)
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: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch branch: 3.1 Merge to openssl-3.1 branch: 3.2 Merge to openssl-3.2 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

5 participants