mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
lib/server: Close connection when client app-level handshake fails
This fixes the following security vulnerability:
- CVE-2021-42075 DoS via file descriptor exhaustion
The issue has been reported by Matthias Gerstner <mgerstner@suse.de>.
(cherry picked from commit deefecc262)
This commit is contained in:
@@ -195,6 +195,11 @@ ClientListener::handleUnknownClient(const Event&, void* vclient)
|
||||
new TMethodEventJob<ClientListener>(this,
|
||||
&ClientListener::handleClientDisconnected,
|
||||
client));
|
||||
} else {
|
||||
auto* stream = unknownClient->getStream();
|
||||
if (stream) {
|
||||
stream->close();
|
||||
}
|
||||
}
|
||||
|
||||
// now finished with unknown client
|
||||
|
||||
Reference in New Issue
Block a user