Skip to content

QueryFlood wrong check #16

@samphunter

Description

@samphunter
bool CheckQueryFlood(unsigned int binaryAddress)
{
    static DWORD dwLastQueryTick = 0;
    static unsigned int lastBinAddr = 0;

    if (!dwLastQueryTick) {
        dwLastQueryTick = (DWORD)GetTickCount();
        lastBinAddr = binaryAddress;
        return 0;
    }
    if (lastBinAddr == binaryAddress) { // Probably should be !=
        return 0;
    }
    if ((GetTickCount() - dwLastQueryTick) < 25) {
        return 1;
    }
    dwLastQueryTick = GetTickCount();
    lastBinAddr = binaryAddress;
    return 0;
}
  • Also the ban checking in RCON Packets seems not to work. Client was able to flood me eaven when he was banned. I had to disable rcon console
  • And also, the flood somehow caused both stack and heap underflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions