chore(deps): update rust crate rustls to v0.22.4 [security] #66
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.
This PR contains the following updates:
0.22.2
->0.22.4
GitHub Vulnerability Alerts
CVE-2024-32650
Summary
rustls::ConnectionCommon::complete_io
could fall into an infinite loop based on network input.Details
Verified at
0.22
and0.23
rustls
, but0.21
and0.20
release lines are also affected.tokio-rustls
andrustls-ffi
do not callcomplete_io
and are not affected.rustls::Stream
andrustls::StreamOwned
types usecomplete_io
and are affected.When using a blocking rustls server, if a client send a
close_notify
message immediately afterclient_hello
, the server'scomplete_io
will get in an infinite loop where:eof
: falseuntil_handshaked
: trueself.is_handshaking()
: trueself.wants_write()
: falseself.wants_read()
: falsePoC
cargo run --bin simpleserver test-ca/rsa/end.fullchain test-ca/rsa/end.key
rustls::conn::ConnectionCommon::complete_io
, you could see the function is spinning.Also note that the server thread is stuck in this infinite loop even if the client closes the socket.
Impact
This is a DOS.
A multithread non-async server that uses
rustls
could be attacked by getting few requests like above (each request could cause one thread to spin) and stop handling normal requests.Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.