Skip to contentSkip to conversation

bug in fsck or ext2/ext3?

DISCUSSION Antoine Martin 4 participants 5 messages Sep 24, 2007

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Ted / LKML,

I've got this snapshot of an ext3 filesystem with a directory that simply cannot be removed! (image below is just 1.2MB) As root:

# wget http://users.nagafix.co.uk/~antoine/root-broken.bz2
# bunzip2 root-broken.bz2
# mount -o loop -t ext2 root-broken ./tmp
# rm -fr tmp/chroot.broken
rm: cannot remove directory (...)
Same result when trying to do anything to those files chown/chmod/touch:
"Operation not permitted"

Tested with e2fsprogs v1.39 on 3 systems.
Not sure where else to post this...

Cheers
Antoine
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG9+xHGK2zHPGK1rsRCn6/AJ0S9/D1LTTxsi69uVovKRURa1fFhACfcEzx 8I6nOimUYCFKh9oX6ebnLc0=
=FhTL
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 11 lines · Antoine Martin

I've got this snapshot of an ext3 filesystem with a directory that simply cannot be removed! (image below is just 1.2MB) As root:

# wget http://users.nagafix.co.uk/~antoine/root-broken.bz2
# bunzip2 root-broken.bz2
# mount -o loop -t ext2 root-broken ./tmp
# rm -fr tmp/chroot.broken
rm: cannot remove directory (...)
Same result when trying to do anything to those files chown/chmod/touch:
"Operation not permitted"
Quoted 2 lines

Tested with e2fsprogs v1.39 on 3 systems.
Not sure where else to post this...

Various files in the directories it complains about have their 'i'
bit set. lsattr will show you. chattr -i those files, and the
directory is removable again.

Dave

Signature · 1 line
http://www.codemonkey.org.uk
#4 lore raw
In reply to Antoine Martin
Quoted 13 lines · On Monday 24 September 2007 17:56:39 Antoine Martin wrote:

Hi Ted / LKML,

I've got this snapshot of an ext3 filesystem with a directory that simply cannot be removed! (image below is just 1.2MB) As root:

# wget http://users.nagafix.co.uk/~antoine/root-broken.bz2
# bunzip2 root-broken.bz2
# mount -o loop -t ext2 root-broken ./tmp
# rm -fr tmp/chroot.broken
rm: cannot remove directory (...)
Same result when trying to do anything to those files chown/chmod/touch:
"Operation not permitted"
Quoted 2 lines

Tested with e2fsprogs v1.39 on 3 systems.
Not sure where else to post this...

URL is broken. Tried doing a "lsattr" to ensure no xattrs (like +i) are set?

Signature · 4 lines
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.
#2 lore raw
In reply to Dave Jones
Quoted 10 lines · Dave Jones
Quoted 4 lines · Antoine Martin
# rm -fr tmp/chroot.broken
rm: cannot remove directory (...)
Same result when trying to do anything to those files chown/chmod/touch:
"Operation not permitted"

Various files in the directories it complains about have their 'i'
bit set. lsattr will show you. chattr -i those files, and the
directory is removable again.

Additionally, this is a classic symptom of malware. A directory named "..." is a big hint.

#3 lore raw
Quoted 8 lines · David Newall
Quoted 7 lines · Dave Jones
Quoted 4 lines · Antoine Martin
# rm -fr tmp/chroot.broken
rm: cannot remove directory (...)
Same result when trying to do anything to those files chown/chmod/touch:
"Operation not permitted"
Quoted 6 lines
Quoted 3 lines

Various files in the directories it complains about have their 'i'
bit set. lsattr will show you. chattr -i those files, and the
directory is removable again.

Additionally, this is a classic symptom of malware. A directory named "..." is a big hint.

That was "..." as in "more stuff follows" rather than the actual name being reported.

Dave

Signature · 1 line
http://www.codemonkey.org.uk