-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix native memory leak on OCSP_Response #96561
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
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones Issue DetailsThis PR makes sure we parse OCSP_Response only once per certificate. This fixes a leak when We did not hit this before because the implementation generally retrieves the peer's certificate only once, but during renegotiation, we may ask for it multiple times.
|
|
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones Issue DetailsThis PR makes sure we parse OCSP_Response only once per certificate. This fixes a leak when We did not hit this before because the implementation generally retrieves the peer's certificate only once, but during renegotiation, we may ask for it multiple times.
|
wfurt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
All CI failures are Known Build Errors. |
|
/backport to release/8.0-staging |
|
/backport to release/7.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7431377625 |
|
Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/7431377941 |
|
Any ideas of when will this be available at the docker images? |
|
February if we get it approved in next few days. Likely month later otherwise as part of regular servicing cadence. |
Fixes #96616.
This PR makes sure we parse OCSP_Response only once per certificate. This fixes a leak when
CryptoNative_SslGetPeerCertificateis called multiple times to retrieve the same certificate, as previously the already parsed OCSP_RESPONSE in X509 instance would be simply overwritten without freeing it.We did not hit this before because the implementation generally retrieves the peer's certificate only once, but during renegotiation, we may ask for it multiple times.