All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: Daniel J Walsh <dwalsh@redhat.com>,
	SELinux <SELinux@tycho.nsa.gov>,
	Colin Walters <walters@redhat.com>
Subject: Re: Proposed patch for libselinux
Date: Tue, 26 Oct 2004 16:21:55 +0100	[thread overview]
Message-ID: <20041026152155.GB8652@lkcl.net> (raw)
In-Reply-To: <1098799981.27060.17.camel@moss-spartans.epoch.ncsc.mil>

On Tue, Oct 26, 2004 at 10:13:01AM -0400, Stephen Smalley wrote:
> On Tue, 2004-10-26 at 10:21, Luke Kenneth Casson Leighton wrote:
> >  it would appear, therefore, that no provision has been made for
> >  filesystem recovery.
> 
> star and (recently patched) rsync supports backing up security
> attributes from live filesystems.
> 
> >  i find frequently that ext3 filesystem damage results in fsck.ext3
> >  going "the extended attributes aren't valid: truncating".
> 
> I've never seen this.  Easily reproducible?
 
 this was four/five months ago - if you recall i sent details about it
 at the time, and part of the "solution" was to upgrade the / partition
 to ext3 (!)

 let me try and think.

 the circumstances under which this occurred were with a 2.6.7 selinux
 kernel, with an ext2 filesystem, i would do a make relabel: something
 was going badly wrong (which i never tracked down, i just moved on...)
 such that on the next reboot, the filesystem could not be shut down
 properly...

 ... it was related to that bug about having a program that would not
 let go of a file handle on the /usr partition, such that at shutdown
 time the /usr partition was remounted read-only, such that on startup
 /etc/mtab had a record of /usr being mounted read-only...

 ... and permission to overwrite /etc/mtab was banned from
 initrc_t, such that it was not possible to clear /etc/mtab,
 such that no mounting /usr AT ALL was done because /etc/mtab
 had a record of /usr being mounted read-only...

 ... at that point, things got very bad, i would have to shut down the
 computer: /etc/mtab would be cleared at shutdown (because no programs
 were or could be using the /usr partition)

 at _that_ point, on the next reboot, the filesystem would be severely
 damaged, and _that's_ when fsck.ext2 found stacks of damaged extended
 attributes, and would truncate them.

 
 so um... easily reproducible?  uhm... not really!!!

 slightly on the reassuring side:

 * i upgraded to 2.6.8 and haven't had the problem since.

 * i reported the problem about /etc/mtab and programs on /usr a couple
   of months back, and posted a fix for the /etc/init.d scripts (i
   think) which russell has since incorporated into initscripts.

   /etc/init.d/mountvirtfs.  yes.

   oh yes that's right it was to do with the detection of whether
   /etc was on a writeable partition by attempting to "touch /etc"
   from an initrc_t context - which of course will fail: the necessary
   change was to touch /etc/mtab instead.

 * i converted the / partition from ext2 to ext3 and thus "avoided"
   the issue.

 l.
 
-- 
--
you don't have to BE MAD   | this space    | my brother wanted to join mensa,
  to work, but   IT HELPS  |   for rent    | for an ego trip - and get kicked 
 you feel better!  I AM    | can pay cash  | out for a even bigger one.
--

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2004-10-26 15:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 21:35 Proposed patch for libselinux Daniel J Walsh
2004-10-22 12:48 ` Stephen Smalley
2004-10-22 13:22   ` Daniel J Walsh
2004-10-22 13:44     ` Stephen Smalley
2004-10-22 14:22       ` Daniel J Walsh
2004-10-22 15:56   ` Luke Kenneth Casson Leighton
2004-10-22 19:55     ` Daniel J Walsh
2004-10-22 20:22     ` Daniel J Walsh
2004-10-25 14:52       ` Stephen Smalley
2004-10-25 15:31         ` Colin Walters
2004-10-25 18:00         ` Daniel J Walsh
2004-10-26 14:21         ` Luke Kenneth Casson Leighton
2004-10-26 14:13           ` Stephen Smalley
2004-10-26 15:21             ` Luke Kenneth Casson Leighton [this message]
2004-10-26 18:05           ` Luke Kenneth Casson Leighton
2004-10-29 23:28   ` Proposed patch for libselinux -- xdr ??? Nifty Hat Mitch
2004-10-22 13:23 ` Proposed patch for libselinux Stephen Smalley
2004-10-22 13:45   ` Daniel J Walsh
2004-10-22 14:15     ` Stephen Smalley
2004-10-22 14:24       ` Daniel J Walsh
2004-10-22 14:30         ` Stephen Smalley
2004-10-22 18:01           ` Daniel J Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041026152155.GB8652@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=SELinux@tycho.nsa.gov \
    --cc=dwalsh@redhat.com \
    --cc=sds@epoch.ncsc.mil \
    --cc=walters@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.