Repository navigation
quic: fix channel leak when ossl_quic_provide_initial_secret fails - #30612
Closed
programsurf wants to merge 1 commit into
Closed
programsurf wants to merge 1 commit into
programsurf wants to merge 1 commit into
Conversation
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial
programsurf
force-pushed
the
fix/quic-channel-leak
branch
from
March 27, 2026 23:32
2337f2c to
31c270a
Compare
Sashan
approved these changes
Mar 27, 2026
Sashan
left a comment
Contributor
There was a problem hiding this comment.
yes, looks good. thank you.
2 tasks
t8m
requested changes
Apr 8, 2026
esyr
approved these changes
Apr 8, 2026
t8m
approved these changes
Apr 8, 2026
Member
|
|
Collaborator
|
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
openssl-machine
pushed a commit
that referenced
this pull request
Apr 15, 2026
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:44:51 2026 (Merged from #30612)
openssl-machine
pushed a commit
that referenced
this pull request
Apr 15, 2026
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:47:50 2026 (Merged from #30612)
openssl-machine
pushed a commit
that referenced
this pull request
Apr 15, 2026
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:48:05 2026 (Merged from #30612)
Contributor
|
Merged to labeled branches. Thank you for the contribution! |
openssl-machine
pushed a commit
that referenced
this pull request
Apr 15, 2026
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:48:21 2026 (Merged from #30612)
daunabomba
pushed a commit
to daunabomba/openssl
that referenced
this pull request
Jul 24, 2026
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:48:21 2026 (Merged from openssl#30612)
rickyringler
pushed a commit
to rickyringler/openssl
that referenced
this pull request
Aug 21, 2026
In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:44:51 2026 (Merged from openssl#30612)
pr000000f
added a commit
to pr000000f/tongsuo-dev
that referenced
this pull request
Sep 23, 2026
…ails Imported from OpenSSL (openssl/openssl). Upstream commit: c88801515da4f328cb063c472d3727144eadc0c7 Upstream PR: openssl/openssl#30612 This is a prerequisite for backporting CVE-2026-18798. OpenSSL original commit message From c88801515da4f328cb063c472d3727144eadc0c7 Mon Sep 17 00:00:00 2001 From: Sunwoo Lee <[email protected]> Date: Sat, 28 Mar 2026 08:22:02 +0900 Subject: [PATCH] quic: fix channel leak when ossl_quic_provide_initial_secret fails In port_bind_channel(), when ossl_quic_provide_initial_secret() fails, the function returns without freeing the QUIC_CHANNEL that was just created by port_make_channel(). The caller sees new_ch == NULL and cannot free it, leaking the channel and all its sub-allocations (QRX, QTX, TXP, ACKM). Add ossl_quic_channel_free(ch) before the early return, matching the cleanup pattern already used by the other error paths in the same function (lines 864, 873). CWE-401 Reported-by: Sunwoo Lee <[email protected]> CLA: trivial Reviewed-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> MergeDate: Wed Apr 15 10:47:50 2026 (Merged from openssl/openssl#30612)
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.
In port_bind_channel(), when ossl_quic_provide_initial_secret()
fails, the function returns without freeing the QUIC_CHANNEL
that was just created by port_make_channel(). The caller sees
new_ch == NULL and cannot free it, leaking the channel and all
its sub-allocations (QRX, QTX, TXP, ACKM).
Add ossl_quic_channel_free(ch) before the early return, matching
the cleanup pattern already used by the other error paths in the
same function (lines 864, 873).
CWE-401
Reported-by: Sunwoo Lee [email protected]
CLA: trivial
Checklist