Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for CVE-2017-15133 TCP DOS (#631)
serveTCP calls reader.ReadTCP in the accept loop rather than in the per-connection goroutine. If an attacker opens a connection and leaves it idle, this will block the accept loop until the connection times out (2s by default). During this time no other incoming connections will succeed, preventing legitimate queries from being answered. This commit moves the call to reader.ReadTCP into the per-connection goroutine. It also adds a missing call to Close whose absence allowed file-descirptors to leak in select cases. This attack and fix have no impact on serving UDP queries.
- Loading branch information