Skip to content

[3.11] gh-156293: Use-after-free for server-side SSLContext with sni_callback (GH-158504) - #158523

Merged
pablogsal merged 2 commits into
python:3.11from
gpshead:gh-156293-ssl-sni-callback-3.11
Oct 1, 2026
Merged

pablogsal merged 2 commits into
python:3.11from
gpshead:gh-156293-ssl-sni-callback-3.11

Conversation

@gpshead

@gpshead gpshead commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

…ugh a released SSLContext

The servername (SNI) callback located its SSLContext through a borrowed
pointer registered with OpenSSL, which can outlive the SSLContext object.
Look the context up from the SSL object instead, and unregister the
callback when the context is deallocated.

Backport of 87665c9,
adapted to this branch's servername callback code.
@pablogsal
pablogsal merged commit b12968c into python:3.11 Oct 1, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.11 only security fixes release-blocker topic-SSL type-security A security issue

Projects

Development

Successfully merging this pull request may close these issues.

2 participants