Add NULL checks for MakeUnique in SSL cipher list inheritance#3065
Merged
Add NULL checks for MakeUnique in SSL cipher list inheritance#3065
Conversation
Add missing NULL checks after MakeUnique<SSLCipherPreferenceList>() and Init() return value checks during cipher list inheritance from SSL_CTX to SSL in SSL_new(). Under OOM, MakeUnique returns nullptr and the subsequent Init() call would dereference it, causing a crash.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3065 +/- ##
==========================================
+ Coverage 78.37% 78.38% +0.01%
==========================================
Files 689 689
Lines 121078 121082 +4
Branches 16966 16965 -1
==========================================
+ Hits 94889 94906 +17
+ Misses 25294 25281 -13
Partials 895 895 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
manastasova
approved these changes
Mar 3, 2026
justsmth
approved these changes
Mar 4, 2026
nebeid
pushed a commit
to nebeid/aws-lc
that referenced
this pull request
Mar 23, 2026
### Description of changes: Add missing NULL checks after MakeUnique<SSLCipherPreferenceList>() and Init() return value checks during cipher list inheritance from SSL_CTX to SSL in SSL_new(). Under OOM, MakeUnique returns nullptr and the subsequent Init() call would dereference it, causing a crash. ### Testing: How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer? CI By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
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.
Description of changes:
Add missing NULL checks after MakeUnique() and
Init() return value checks during cipher list inheritance from SSL_CTX
to SSL in SSL_new(). Under OOM, MakeUnique returns nullptr and the
subsequent Init() call would dereference it, causing a crash.
Testing:
How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?
CI
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.