-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
src: account for OpenSSL unexpected version #54038
src: account for OpenSSL unexpected version #54038
Conversation
ede4118
to
0f3057f
Compare
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.
Can you add a test?
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.
We should add a comment to avoid confusion for future readers.
I don’t think this is testable with the existing CI configuration - this needs a new build config for the version string definition so needs a new CI job IIUC. It’s a separate question whether we should add a job to test linking to BoringSSL in the CI - this is not strictly supported and the best we can do is just accepting patches when others are willing to maintain it. |
0f3057f
to
89a2088
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54038 +/- ##
==========================================
+ Coverage 94.50% 94.52% +0.01%
==========================================
Files 314 314
Lines 121090 121090
Branches 23696 23705 +9
==========================================
+ Hits 114442 114457 +15
+ Misses 6443 6431 -12
+ Partials 205 202 -3 |
89a2088
to
65d2ada
Compare
Commit Queue failed- Loading data for nodejs/node/pull/54038 ✔ Done loading data for nodejs/node/pull/54038 ----------------------------------- PR info ------------------------------------ Title src: account for OpenSSL unexpected version (#54038) Author Shelley Vohr <shelley.vohr@gmail.com> (@codebytere) Branch codebytere:fix-potential-out-of-range -> nodejs:main Labels c++ Commits 1 - src: account for OpenSSL unexpected version Committers 1 - Shelley Vohr <shelley.vohr@gmail.com> PR-URL: https://github.com/nodejs/node/pull/54038 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54038 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - src: account for OpenSSL unexpected version ℹ This PR was created on Thu, 25 Jul 2024 10:19:07 GMT ✔ Approvals: 7 ✔ - Richard Lau (@richardlau) (TSC): https://github.com/nodejs/node/pull/54038#pullrequestreview-2199072126 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/54038#pullrequestreview-2199377802 ✔ - Mohammed Keyvanzadeh (@VoltrexKeyva): https://github.com/nodejs/node/pull/54038#pullrequestreview-2199472184 ✔ - Franziska Hinkelmann (@fhinkel): https://github.com/nodejs/node/pull/54038#pullrequestreview-2201735359 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/54038#pullrequestreview-2201952056 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/54038#pullrequestreview-2202033617 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/54038#pullrequestreview-2203222758 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-07-29T10:32:35Z: https://ci.nodejs.org/job/node-test-pull-request/60718/ - Querying data for job/node-test-pull-request/60718/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/10182407884 |
Landed in 67bc6a4 |
PR-URL: #54038 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #54038 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Refs #53456
Fixes a crash present in Electron after ingesting the above PR. This happened because the logic to parse for an OpenSSL version didn't account for
OpenSSL_version
returning a value that doesn't match the expected pattern ofOpenSSL 1.1.0i 14 Aug 2018
. In Electron's case,OpenSSL_version
returns justBoringSSL
, which in combination with thesearch
logic not accounting for the delimiter not being present caused an out-of-bounds crash:This fixes that by checking for the null terminator and returning
0.0.0
when the target delimiter isn't present.