eternalcodes / EternalJK

Effort to maintain and improve OpenJK
GNU General Public License v2.0
60 stars 23 forks source link

Improved OOB packet rate limiter #97

Closed aufau closed 4 years ago

aufau commented 5 years ago

This is an improved server rate limiter for incoming Out Of Bounds (Connectionless) packets.

The purpose of these patches is to mitigate spoofed IP OOB DOS attacks. This is achieved by two changes:

  1. Fixing issue with original q3a rate limiter that was causing very high CPU usage when under such attack, up to the point of rendering server unusable.
  2. Allowing "whitelisted" players (manually or players who have managed to fully connect in the past) to fully access OOB server protocol when server is under such attack.

There are 3 new cvars:

Known issues:

  1. Lack of whitelist.dat file access synchronization. Rudimentary version of this was implemented in jk2mv.
  2. Concerns have been raised about storing IP in the whitelist.dat file being against the ACTA. If this is a problem, there is a cvar sv_autoWhitelist, or IP could be stored as its digest.

I can explain the attacks addressed by this PR and how they are mitigated in depth, on a private communication channel.