Bug 436123 - selinux corrupts ext3 fs
selinux corrupts ext3 fs
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Eric Sandeen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-03-05 10:31 EST by Need Real Name
Modified: 2009-01-09 01:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-09 01:06:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
yum.log for the update that appeared to trigger the bug (15.54 KB, text/plain)
2008-03-05 10:31 EST, Need Real Name
no flags Details
Contents of /lost+found after fsck (2.01 MB, application/x-gzip)
2008-03-06 08:03 EST, Need Real Name
no flags Details

  None (edit)
Description Need Real Name 2008-03-05 10:31:41 EST
Description of problem:

After running `yum update` which completed without error, and rebooting 
(because the kernel was upgraded), Fedora 8 would not start because the / 
partition (ext3) was found to have problems:

"primary superblock differs from backup, check forced".  e2fsck could not 
resolve the problems and dropped to a shell.  Rather than run e2fsck on the 
mounted / partition, I booted from a live CD to run e2fsck.  There were 
problems with the link count and directory detachment of several files, which 
were saved to "/lost+found".  In all cases, the file contents were related to 
SELinux.  I can send the contents of /lost+found if this would help.

Version-Release number of selected component (if applicable):

several selinux components updated - see attached yum.log

How reproducible:

Happened once (and once before on a Fedora 8 release candidate).  Have not 
attempted to reproduce.

It is possible that the fs corruption had occurred before the yum update, but I 
had the same experience twice and on both occasions the yum update was the last 
step before reboot.

Additional info:

I have used Red Hat Linux for 9 years, and only twice have I had an e2fsck 
failure that was not caused by faulty hardware.  In both cases, selinux was 
implicated.  After the first occasion (on a release candidate of Fedora 8), I 
disabled selinux when installing (on an empty partition) (the final) Fedora 8, 
and removed the selinux RPMs from my system as best I could, hoping that this 
would make me safe.

This is a critical bug - the consequences on a remote system might include 
failure to restart after a software upgrade; or the danger of running an 
inconsistent filesystem.

In 9 years this is the only serious bug I have ever found in a Red Hat product. 
No other software component has ever corrupted an ext3 fs, despite occasional 
crashes of desktop applications, power failures etc: ext3 is rock-solid and 
this is one reason why I love using Linux.  I have to wonder why selinux, with 
no obvious crash or reported error, seems to be able to damage an ext3 

It would be useful to know how to permanently remove selinux so that the other 
(extremely well-engineered) parts of Fedora 8 can be used without it.
Comment 1 Need Real Name 2008-03-05 10:31:41 EST
Created attachment 296885 [details]
yum.log for the update that appeared to trigger the bug
Comment 2 Eric Sandeen 2008-03-05 17:31:55 EST
So FWIW, it is unlikely that selinux is at fault; rather it may be ext3's
extended attribute handling, which selinux makes use of...

e2fsprogs-1.40.4 has some new checks in place that may have forced the check
(the "primary superblock differs..." message; I wish it printed what the
differences *were*) so it is quite possible that the problems occurred much
earlier and were only found due to the forced check.  When was the last time the
fs was checked?

Do you have either the repair output, or an e2image of the filesystem prior to
repair, so we can get an idea of what corruption was found?
Comment 3 Need Real Name 2008-03-06 08:03:06 EST
Created attachment 297043 [details]
Contents of /lost+found after fsck
Comment 4 Need Real Name 2008-03-06 08:05:57 EST
The fs was created in November 2007, and might not have been checked since then.

Sorry, no repair output, no e2image, but I have attached the contents of
/lost+found which might be some help.
Comment 5 Eric Sandeen 2008-03-06 11:51:07 EST
I'll look at the lost+found contents after the fsck, but I'm not sure it will be
a lot of help.

Unfortunately this looks a bit like "something, somewhere went wrong at some
point and e2fsck discovered it" but it's not a lot to go on.

Regarding selinux, you can certainly disable it if you wish, but I don't think
it's the root cause here.
Comment 6 Bug Zapper 2008-11-26 05:01:37 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 7 Bug Zapper 2009-01-09 01:06:43 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.