-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix: Akka.Remote should not shutdown on invalid TLS traffic #7939
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
Merged
Aaronontheweb
merged 1 commit into
akkadotnet:dev
from
Aaronontheweb:fix/7938-tls-invalid-traffic-shutdown
Nov 24, 2025
Merged
Fix: Akka.Remote should not shutdown on invalid TLS traffic #7939
Aaronontheweb
merged 1 commit into
akkadotnet:dev
from
Aaronontheweb:fix/7938-tls-invalid-traffic-shutdown
Nov 24, 2025
Conversation
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
When TLS is enabled, invalid traffic (like HTTP requests) hitting the Akka.Remote port would cause the entire ActorSystem to shut down with exit code 79. This was due to overly aggressive TLS handshake failure handling introduced in akkadotnet#7839. Changes: - Modified TcpTransport to only trigger CoordinatedShutdown for client-side TLS handshake failures (outbound connections we initiate) - Server-side TLS failures (incoming invalid connections) now just log a warning and reject the connection without shutting down - Added test to verify servers remain running when invalid traffic hits the TLS port This makes Akka.Remote resilient to port scanners, misconfigured clients, or malicious traffic while maintaining strict security for legitimate connections. Fixes akkadotnet#7938
Aaronontheweb
commented
Nov 24, 2025
| cs.Run(new TlsHandshakeFailureReason($"TLS handshake failed on channel [{context.Channel.LocalAddress}->{context.Channel.RemoteAddress}](Id={context.Channel.Id})")); | ||
| // Only shutdown the ActorSystem if this is a client-side failure | ||
| // Server-side failures (incoming connections) should just reject the connection | ||
| if (isClient) |
Member
Author
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.
Fix is simple - just don't shut the server down when clients with invalid certs connect
Arkatufus
approved these changes
Nov 24, 2025
Contributor
Arkatufus
left a comment
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
Aaronontheweb
added a commit
to Aaronontheweb/akka.net
that referenced
this pull request
Nov 25, 2025
…et#7939) When TLS is enabled, invalid traffic (like HTTP requests) hitting the Akka.Remote port would cause the entire ActorSystem to shut down with exit code 79. This was due to overly aggressive TLS handshake failure handling introduced in akkadotnet#7839. Changes: - Modified TcpTransport to only trigger CoordinatedShutdown for client-side TLS handshake failures (outbound connections we initiate) - Server-side TLS failures (incoming invalid connections) now just log a warning and reject the connection without shutting down - Added test to verify servers remain running when invalid traffic hits the TLS port This makes Akka.Remote resilient to port scanners, misconfigured clients, or malicious traffic while maintaining strict security for legitimate connections. Fixes akkadotnet#7938
Aaronontheweb
added a commit
to Aaronontheweb/akka.net
that referenced
this pull request
Nov 25, 2025
…et#7939) When TLS is enabled, invalid traffic (like HTTP requests) hitting the Akka.Remote port would cause the entire ActorSystem to shut down with exit code 79. This was due to overly aggressive TLS handshake failure handling introduced in akkadotnet#7839. Changes: - Modified TcpTransport to only trigger CoordinatedShutdown for client-side TLS handshake failures (outbound connections we initiate) - Server-side TLS failures (incoming invalid connections) now just log a warning and reject the connection without shutting down - Added test to verify servers remain running when invalid traffic hits the TLS port This makes Akka.Remote resilient to port scanners, misconfigured clients, or malicious traffic while maintaining strict security for legitimate connections. Fixes akkadotnet#7938
Aaronontheweb
added a commit
to Aaronontheweb/akka.net
that referenced
this pull request
Nov 25, 2025
…et#7939) When TLS is enabled, invalid traffic (like HTTP requests) hitting the Akka.Remote port would cause the entire ActorSystem to shut down with exit code 79. This was due to overly aggressive TLS handshake failure handling introduced in akkadotnet#7839. Changes: - Modified TcpTransport to only trigger CoordinatedShutdown for client-side TLS handshake failures (outbound connections we initiate) - Server-side TLS failures (incoming invalid connections) now just log a warning and reject the connection without shutting down - Added test to verify servers remain running when invalid traffic hits the TLS port This makes Akka.Remote resilient to port scanners, misconfigured clients, or malicious traffic while maintaining strict security for legitimate connections. Fixes akkadotnet#7938
Aaronontheweb
added a commit
that referenced
this pull request
Nov 25, 2025
…7952) When TLS is enabled, invalid traffic (like HTTP requests) hitting the Akka.Remote port would cause the entire ActorSystem to shut down with exit code 79. This was due to overly aggressive TLS handshake failure handling introduced in #7839. Changes: - Modified TcpTransport to only trigger CoordinatedShutdown for client-side TLS handshake failures (outbound connections we initiate) - Server-side TLS failures (incoming invalid connections) now just log a warning and reject the connection without shutting down - Added test to verify servers remain running when invalid traffic hits the TLS port This makes Akka.Remote resilient to port scanners, misconfigured clients, or malicious traffic while maintaining strict security for legitimate connections. Fixes #7938
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.
Summary
Changes
TcpTransport.UserEventTriggered()to distinguish between client and server-side TLS failuresCoordinatedShutdownTest Plan
Server_side_invalid_traffic_should_not_shutdown_serverto verify fixDotNettyTlsHandshakeFailureSpecpassFixes #7938