3 ms·
With bounds checks: game crashes, meaningless error message given to the user. Without bounds checks: I join a multiplayer lobby, and the next thing I know my
by ekimekim 4y ago
With bounds checks: game crashes, meaningless error message given to the user.
Without bounds checks: I join a multiplayer lobby, and the next thing I know my computer is part of a botnet.
This isn't an imaginary fear, it has happened many times. Some examples from a brief search:
https://gridinsoft.com/blogs/rce-vulnerability-in-gta-online/ https://gridinsoft.com/blogs/rce-vulnerability-in-gta-online...
https://www.polygon.com/22898895/dark-souls-pvp-exploit-multiplayer-servers-remote-code-execution https://www.polygon.com/22898895/dark-souls-pvp-exploit-mult...
https://security.gerhardt.link/RCE-in-Factorio/ https://security.gerhardt.link/RCE-in-Factorio/
I am not claiming all of these would've been prevented by bounds checking arrays, or even memory safety in general. The point is that security is not optional just because it's a game.
- dxhdr 4y agoNow suppose your game runs in a WASM sandbox and re-run those scenarios. What do you gain from bounds checks? I'm not suggesting that shipping without bounds checks is wise or leads to a better product. However I do think with /some games/ security is basically not a concern.
- Arnavion 4y agoHeartbleed still happens inside a sandbox, because it's the sandboxed memory that leaks. For multiplayer games specifically, that can be a client auth key that can be used to impersonate you.