Jump to content

Valve Steam CLEANS Linux PCs


abarbarian
 Share

Recommended Posts

Dodgy shell script triggers classic rm -rf /

 

Linux desktop gamers should know of a bug in Valve's Steam client that will, if you're not careful, delete all files on your PC belonging to your regular user account.

 

Steam for Linux can be hazardous for your PC's health

 

 

The problem hasn't been sorted out and there is no sign of the Valve devs investigating this just yet, although that will probably happen very soon.

 

Personally :harhar: I always use compressed air to clean my pc

  • Like 1
Link to comment
Share on other sites

securitybreach

The only way that this will happen is if you moved ~/.local/share/Steam to a different directory and then launched steam. Using that code snippet was stupid anyway but Steam hasn't been able to reproduce the bug yet so this could be another BS story.

 

It is hard to say but there have been a few in-app updates for steam in the last few days since the initial issue was reported, so it could of been fixed already.

 

As long as you leave the folder where it belongs, you shouldn't have an issue anyway. Your data should be backed up anyway ;)

 

B)

Link to comment
Share on other sites

Yer right it may only affect moved folders. Doubt if it is BS as the dodgy code is part of the steam.sh. By now I would hope that it has been fixed.

 

 

 

 

The code in question is this in steam.sh:

# figure out the absolute path to the script being run a bit
# non-obvious, the ${0%/*} pulls the path out of $0, cd's into the
# specified directory, then uses $PWD to figure out where that
# directory lives - and all this in a subshell, so we don't affect
# $PWD
STEAMROOT="$(cd "${0%/*}" && echo $PWD)"

# Scary!
rm -rf "$STEAMROOT/"*

 

Yes, $STEAMROOT can end up being empty, but no check is made for that. Notice the # Scary! line, an indication the programmer knew there was the potential for catastrophe.

 

:fish:

Link to comment
Share on other sites

securitybreach

Well now it says:

# Check before removing
if [ "$STEAMROOT" != "" ]; then
rm -rf "$STEAMROOT/"*
fi

# Move things back into place
mv -f "$STEAM_SAVE/"* "$STEAMROOT/"
rmdir "$STEAM_SAVE"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...