Steam for Linux Bug Could Nuke Your Hard Drive
Ashley Allen / 2 years ago
A bug within Steam for Linux has been discovered that could potentially wipe personal data and files stored on both the PC’s internal hard drive any connected external drive.
The fault, as outlined on Valve’s GitHub Stream for Linux page, is within a line of code in steam.sh that reads ‘rm -rf “$STEAMROOT/”. The command is meant to refresh Steam files on user request, but can also be triggered if Steam’s installation directory is moved, which removes the directory path, rewriting the line as ‘rm -rf “/'”. Without a specific directory to point at, the refresh function indiscriminately clears every drive it can find.
One user on GitHub attested to losing all their system data, including all files stored on a 3TB external drive.
According to PC World, Valve is aware of a handful of users that have been affected by the bug, but has been unable to replicate the phenomenon itself, and is “adding some additional checks to ensure this is not possible while we continue to investigate”.
Until the bug is patched, Linux users are advised to leave their Steam installation directory exactly where it is.