Merge pull request #1350 from p12tic/fix-file-handles-leak

Fix file descriptor leak on incomplete connections [SECURITY VULNERABILITY CVE-2021-42075]
This commit is contained in:
Povilas Kanapickas
2021-11-01 14:04:45 +02:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -194,6 +194,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