Security
Security Partly built
What an attacker can and cannot do to a user of the KoG client, stated plainly. Where something is not protected, it says so.
Reporting a vulnerability #
Report vulnerabilities privately through GitHub's private vulnerability reporting of the client repository: on the repository page choose Security, then Report a vulnerability. Please do not open a public issue for it. A report that describes the problem, the affected version and how to reproduce it helps most. See SECURITY.md. Supported: the latest release, once there is one, and the main branch. This is volunteer work with no response time promised, and there is no other reporting address.
What is protected #
| Threat | Result |
|---|---|
| A forged or tampered update manifest | Refused: the signature is checked against keys compiled into the client, for that channel only. |
| Replacing a downloaded file | Refused: the SHA-256 and size of every file are checked before it replaces anything, and the file's address must be on an allow-list. |
| Cross-channel replay (a canary manifest offered as stable) | Refused: per-channel keys, and the channel is inside the signed payload. |
| Rollback to an old version, or freezing updates | Limited: sequence, expiry, version checks and a memory of bad versions. A freeze ends when the manifest expires. |
Takeover of the domain client.kog.tw | Cannot forge a manifest. It can withhold updates, so the client also tries a fallback host under another name. |
| A bad update that does not start | The previous version is restored after two starts that did not reach the start screen. |
| Stolen GitHub account or a malicious pull request (for stable) | Cannot publish a stable update alone: the second signature needs the owner's hardware key. Not yet effective: there is no stable release. |
| Capturing the login | No password, key or token travels on the game connection. The login code is useless without the PKCE verifier, which stays in memory. |
| A local program on the loopback port during login | Random port, short time, exact path and state; see login. |
| A server asking for a login proof it should not get | The client answers only servers listed for the kog community, once per join. Nothing is sent today. |
What is not protected #
Be clear about these limits before you rely on the client for anything.
- Canary and dev are weaker than stable will be. They need only the CI signature. Whoever could read the CI signing keys could sign an update for these channels. That is why they are opt-in testing channels.
- Stable does not exist. Its keys are placeholders, so none of the stable protections has been exercised.
- The client cannot prove, and nobody can prove from outside, that a running client is unmodified. A device key shows that someone holding a key made a signature. It does not show that the program holding it is this one. See the roadmap.
- A program running as you can read your device key, as it could read an SSH key. On Windows and macOS the keychain asks no further question of the same user; on Linux the key is a file with mode 0600.
- A malicious update that is correctly signed would be installed. The signature proves who signed, not that the code is good.
- Builds are not code-signed or notarised for Windows and macOS, so those systems warn, and they cannot vouch for the file.
- There is no certificate pinning for the account service. TLS is verified in the normal way.
- The game connection itself is not encrypted, as in DDNet. The client does not change that.
- Builds are not reproducible, so you cannot rebuild a release and compare it. You can check its attestation.
- An unmodified DDNet client can play on KoG. Nothing here is meant to stop other clients, and nothing here should be read as protection against cheating.
Known weak points #
- The CI private keys are held by automation (see release signing).
- With one maintainer, the person who approves a signing run can approve their own run.
- The Windows free-disk check and the executable-bit handling of the updater were not run on Windows.
- The workflows have had little time in production, and hardware-key signatures were tested with an emulation, not a real key.
- The HTTP steps of the login and the key store have no automated test.
Third-party code #
The client inherits the code of DDNet and TClient, with their bugs and their dependencies (SDL, libcurl, FFmpeg and others). It removed the scripting engine and the chat translation of TClient to reduce what it carries. Added code: Monocypher for Ed25519 and SHA-512. The workflows are checked by CodeQL and a spelling check; first-party actions are pinned by commit.