Fix memory leak in tls_parse_ctos_psk()#25643
Closed
ndossche wants to merge 1 commit into
Closed
Conversation
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial
t8m
approved these changes
Oct 9, 2024
Member
|
OK with CLA: trivial |
Collaborator
|
This pull request is ready to merge |
Member
|
Merged to all the active branches. Thank you for your contribution. |
openssl-machine
pushed a commit
that referenced
this pull request
Oct 11, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #25643) (cherry picked from commit b2474b2)
openssl-machine
pushed a commit
that referenced
this pull request
Oct 11, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #25643) (cherry picked from commit b2474b2)
openssl-machine
pushed a commit
that referenced
this pull request
Oct 11, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #25643)
openssl-machine
pushed a commit
that referenced
this pull request
Oct 11, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #25643) (cherry picked from commit b2474b2)
openssl-machine
pushed a commit
that referenced
this pull request
Oct 11, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #25643) (cherry picked from commit b2474b2)
openssl-machine
pushed a commit
that referenced
this pull request
Oct 11, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #25643) (cherry picked from commit b2474b2)
eclipse-oniro-oh-bot
pushed a commit
to eclipse-oniro-mirrors/third_party_openssl
that referenced
this pull request
Oct 18, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from openssl/openssl#25643) Signed-off-by: lanming <lanming@huawei.com>
eclipse-oniro-oh-bot
pushed a commit
to eclipse-oniro-mirrors/third_party_openssl
that referenced
this pull request
Oct 21, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from openssl/openssl#25643) Signed-off-by: lanming <lanming@huawei.com>
coolshrid
pushed a commit
to coolshrid/openssl
that referenced
this pull request
Nov 9, 2024
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. CLA: trivial Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from openssl#25643)
Closed
Maxlsc
added a commit
to Maxlsc/Tongsuo
that referenced
this pull request
May 7, 2026
`sess` is not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to the `err` label such that `SSL_SESSION_free(sess)` is called. Merged from openssl/openssl#25643
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sessis not NULL at this point, and is freed on the success path, but not on the error path. Fix this by going to theerrlabel such thatSSL_SESSION_free(sess)is called.CLA: trivial
Disclaimer: this bug was found by an experimental static analyzer I'm working on. As such, I could be wrong because even though I manually read the code as well.