Post: Steam bug wipes user files
01-16-2015, 04:48 AM #1
Tustin
Balls of Steel
(adsbygoogle = window.adsbygoogle || []).push({}); I saw this on reddit and thought it was hilarious. Basically in the steam.sh script, there's a variable that holds the value of steams directory called $STEAMROOT. Further down in this script is a command to completely wipe this directory. This command is: rm -rf "$STEAMROOT/"*. The issue is here is that there's no null checks to make sure the string actually holds a value. If the $STEAMROOT var is empty, the delete command is actually rm -rf "/"*, which completely wipes the drive. Very classic mistake and a very poor move by Valve to miss this mistake. Here's the script and line where this occurs: You must login or register to view this content.. There seems to be a similar bug on the windows build too but I haven't looked at that yet.

Reddit discussion: You must login or register to view this content.
01-16-2015, 08:43 AM #2
Glad I don't use Steam on linux, though I fail to see how it would be able to delete everything as it would need root privileges to do that and if you're running it as a user it would probably just fail though I'm not familiar with shell scripting so could be wrong.
01-19-2015, 06:36 PM #3
Cryptic
Former Staff | Content Manager
From an admin...ugh.

Moved: Steam Section.

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo