fix(deps): update rust crate tls-listener to 0.10.0 [security] #457
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.5.1
->0.10.0
GitHub Vulnerability Alerts
CVE-2024-28854
Summary
With the default configuration of tls-listener, a malicious user can open 6.4
TcpStream
s a second, sending 0 bytes, and can trigger a DoS.Details
The default configuration options make any public service using
TlsListener::new()
vulnerable to a slow-loris DoS attack.PoC
Running the HTTP TLS server example: https://github.com/tmccombs/tls-listener/blob/6c57dea2d9beb1577ae4d80f6eaf03aad4ef3857/examples/http.rs, then running the following script will prevent new connections to the server.
Impact
This is an instance of a slow-loris attack. This impacts any publically accessible service using the default configuration of
tls-listener
Mitigation
Previous versions can mitigate this by passing a large value, such as
usize::MAX
as the parameter toBuilder::max_handshakes
.Release Notes
tmccombs/tls-listener (tls-listener)
v0.10.0
Compare Source
Security Advisory
Versions prior to this using the default configuration are vulnerable to a Slowloris attack.
This version mitigates the vulnerability.
Previous versions can mitigate the vulnerability by increasing the value passed to
Builder::max_handshakes
to a largenumber (such as
usize::MAX
). Decreasing thehandshake_timeout
can also help, although it is still strongly recommendedto increase the
max_handshakes
more than the current default.Changes
poll_accept
not to have a limit on the number of pending handshakes in the queue,so that connections that are not making progress towards completing the handshake will not block other
connections from being accepted. This replaces
Builder::max_handshakes
withBuilder::accept_batch_size
.v0.9.1
Compare Source
Miscellaneous Tasks
v0.9.0
Compare Source
Features
until
from AsyncAccept trait. UseStreamExt.take_until
on the TlsListener instead.accept
fn on AsyncAccept trait no longer returns anOption
accept
fn on TlsListener no longer returns an OptionUpgrade
v0.8.0
Compare Source
This is a backwards incompatible release. The main change is that accepting a new connection now returns a tuple of the new connection, and the peer
address. The
AsyncAccept
trait was also changed similarly. TheError
enum was also changed to provide more details about the error. And ifthe handshake times out, it now returns an error instead of silently waiting for the next connection.
Features
[breaking] Add a new error type for handshake timeouts
[breaking] Yield remote address upon accepting a connection, and include it in errors.
Error::ListenerError
is now struct-like instead of tuple-like, and isnon_exhaustive
like the enum itself.Error
now has three type parameters, not two.TlsListener::accept
and<TlsListener as Stream>::next
yields a tuple of (connection, remote address), not just the connection.AsyncAccept
now has an associated typeAddress
, whichpoll_accept
must now return along with the accepted connection.[breaking] More changes for including peer address in response
v0.7.0
Compare Source
Changed
v0.6.0
Compare Source
Added
Changed
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 was generated by Mend Renovate. View the repository job log.