Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/tmp/.. renamed to /tmp/-. deletes / on startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
zaai
Apprentice
Apprentice


Joined: 24 Jul 2004
Posts: 175

PostPosted: Tue Dec 04, 2007 3:22 am    Post subject: /tmp/.. renamed to /tmp/-. deletes / on startup Reply with quote

On startup my laptop start to delete / 8O

I wasn't watching the boot process but I noticed after a few minutes something strange was going on since Lappie shut down by itself. Still blissfully unaware I started up again and noticed a kernel panic, could not run Init. :? Out comes the LiveCD.

Mounted the root folder no problem. Checked some folders and found /bin and /sbin empty. Ouch!

/tmp was also empty except for something very strange:
.. didn't exist but instead -. showed.

Suspicion surfaced and I ran:
<Code> # find . </Code>
Which recursed back to / 8O

On bootup /tmp is erased, since it contained -. which recursed back to / it started deleting the system..

How on earth did this happen?
How can a .. folder be renamed to -. ?

The applications that ran were mplayer/kplayer, and kmail, under a user that has no root or sudo privileges.
_________________
* most bugs can be reduced to either dependency or state *

Athlon64 X2 4800+ on Asus M2N SLI deluxe with 4GB Dual channel
video nVidia GForce 7300 GS 512MB (snail); xorg-7.2
kernel 2.6.24-gentoo-r3
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Dec 04, 2007 4:19 am    Post subject: Reply with quote

Doesn't surprise me, but it is saddening to see such stupid behaviour by bash.

Check out the preserve-root thread for examples of the sort of Linux fanboyism that keeps these sorts of outrageous bugs from being fixed (it's a bug in bash, it sounds like, rather than specifically Gentoo).
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Dec 04, 2007 4:24 am    Post subject: Reply with quote

Use a known good live CD to check all of the partitions which may have been mounted when the corruption occurred, check those partitions and any swap partitions for bad blocks.
Back to top
View user's profile Send private message
zaai
Apprentice
Apprentice


Joined: 24 Jul 2004
Posts: 175

PostPosted: Tue Dec 04, 2007 6:41 pm    Post subject: Reply with quote

Thanks for the reply.

At first I was concerned whether there was a virus at work. Seems like bash is doing it.

I'm still puzzled as to how the (..) dot-dot name can be renamed to (-.) dash-dot. I'd like to track down the curlpit. Is this a known bash bug?
_________________
* most bugs can be reduced to either dependency or state *

Athlon64 X2 4800+ on Asus M2N SLI deluxe with 4GB Dual channel
video nVidia GForce 7300 GS 512MB (snail); xorg-7.2
kernel 2.6.24-gentoo-r3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum