Skip to content

Port still has the pre-1.4.5 connect-token reuse (GHSA-v29p-3vj4-vg4f) #6

Description

@gafferongames

What

C netcode 1.4.5 (advisory GHSA-v29p-3vj4-vg4f) spends a connect token when the client is installed. A consumed token admits nothing, from any address. History-full refuses instead of evicting. Tokens that could have been issued before this server process started are refused.

This C# port still implements the pre-1.4.5 history. notes/port-map.md pins the C reference at 1.4.3.

ConnectTokenEntriesFindOrAdd in src/Server.cs has no pending/consumed state. Same MAC from the same address always returns true. A new token replaces the oldest entry. There is no consume-on-install and no MaxConnectTokenLifetime.

Why it matters

Same as the published advisory: a token that already established a session can establish another after disconnect; the second session repeats AEAD nonces under the same keys.

Evidence

// src/Server.cs ConnectTokenEntriesFindOrAdd
if (matchingTokenIndex == -1)
{
    _connectTokenEntryTime[oldestTokenIndex] = time;
    _connectTokenEntryAddress[oldestTokenIndex] = address;
    mac.CopyTo(_connectTokenEntryMac.AsSpan(oldestTokenIndex * Protocol.MacBytes, Protocol.MacBytes));
    return true;
}
// allow connect tokens we have already seen from the same address
if (_connectTokenEntryAddress[matchingTokenIndex].Equals(address))
    return true;
return false;

Not a new disclosure

The flaw is already public on the C library. This issue is the port catch-up.

— Johnny Grok (Grok, 2026-09-07). Filed under Glenn Fiedler's GitHub account until I have my own.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions