-
Notifications
You must be signed in to change notification settings - Fork 264
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
v1.17: chore: bump rustls to 0.21.11 (backport of #918) #930
Conversation
Cherry-pick of a20e004 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
0c8af12
to
66e33e7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v1.17 #930 +/- ##
=========================================
- Coverage 81.6% 81.6% -0.1%
=========================================
Files 806 806
Lines 219333 219349 +16
=========================================
- Hits 179121 179068 -53
- Misses 40212 40281 +69 |
looks not quite good. rustls use some newer deps |
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
why was this approved? it bumps two implicit dependencies in unclear ways |
yeah. that's why I didn't tag 'automerge' haha. need more eyes on this one but It seems to be a necessary evil if we would like to upgrade rustls 😢 https://github.com/rustls/rustls/blob/v/0.21.11/rustls/Cargo.toml#L20
|
The other changes are due to the upgrade of the version of rustls, if you look at closely it is no different from what is used in master. This is the dependency tree:
This issue is blocking other v1.17 back ports |
Due to the below error, this package needs to be upgraded, and the old version is pinned in solana dependencies, however none of the solana 1.16 versions will get the upgrade. This repo will need its dependencies upgraded to v1.17 on the agave once the below PR is merged. Additionally, there may be issues with solana-program-test in 1.17 that will need to be worked out. anza-xyz/agave#930 ``` Run cargo audit --ignore RUSTSEC-2022-0093 --ignore RUSTSEC-2023-0065 Fetching advisory database from `https://github.com/RustSec/advisory-db.git` Loaded 621 security advisories (from /home/runner/.cargo/advisory-db) Updating crates.io index Scanning Cargo.lock for vulnerabilities (63[4](https://github.com/jito-foundation/stakenet/actions/runs/8759384154/job/24042265021?pr=31#step:4:5) crate dependencies) Crate: rustls Version: 0.20.9 error: 2 vulnerabilities found! Title: `rustls::ConnectionCommon::complete_io` could fall into an infinite loop based on network input Date: 2024-04-19 ID: RUSTSEC-2024-0336 URL: https://rustsec.org/advisories/RUSTSEC-2024-0336 Severity: 7.[5](https://github.com/jito-foundation/stakenet/actions/runs/8759384154/job/24042265021?pr=31#step:4:6) (high) Solution: Upgrade to >=0.23.5 OR >=0.22.4, <0.23.0 OR >=0.21.11, <0.22.0 ```
what's in master is untested. it is not a sufficient criteria for backports |
https://rustsec.org/advisories/RUSTSEC-2024-0336 Only rustls users that call complete_io seem vulnerable. Quinn doesn't seem to call it: https://github.com/quinn-rs/quinn/blob/e1674feb929dfd054e07abea91b070bfdedf1785/quinn-proto/src/crypto/rustls.rs I think we can probably silence this and move on. EDIT: to expand a bit on my thinking: complete_io seems to be something that based on connection state calls some methods. Quinn has a crypto abstraction, so it has that connection state tracking logic outside the rustls code and doesn't use complete_io. |
Quinn is not the only user of rustls. Cargo tree shows a lot of other dependencies. |
Yes, but where do we directly expose it to the internet? The quic endpoints and what else? RPC? RPC likely uses it though tokio which is not vulnerable according to the advisory. What else? |
I used the following to attack the ports:
Have not seen any CPU spike; The attack tool: GHSA-6g7w-8wpp-frhj Modified:
|
socket.connect presumably does TCP tho? |
Yes. On UDP sockets, I got connection refused. |
i think we can ignore it because all of our uses of rustls appear to be client-side and the vuln is against a server process. deal? |
quinn is also server but unaffected so 🤝 |
closing in favor of #1016 |
Problem
solve the audit report
This is an automatic backport of pull request #918 done by [Mergify](https://mergify.com).