Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201103131455.44998.sgrubb@redhat.com>
Date: Sun, 13 Mar 2011 14:55:44 -0400
From: Steve Grubb <sgrubb@...hat.com>
To: oss-security@...ts.openwall.com
Cc: Vasiliy Kulikov <segoon@...nwall.com>
Subject: Re: Untrusted fs and invalid filenames

On Saturday, March 12, 2011 12:03:45 pm Vasiliy Kulikov wrote:
> While POSIX restricts the character set used in filenames, some Linux
> filesystems (at least ext2) permit reserved filenames ".", ".." and
> filenames with "/" inside.  I have a crafted flash drive with ext2 that
> has such files:

I can confirm that ext3/4, xfs, cramfs, and reiserfs also allow these kinds of names. 
I'm sure that with some patience, there are more.


> Guess what does "rm" with such filenames :-)

and tar

 
> What I suggest is something like "-o untrusted" option to mount.  This
> would mean that the system considers the input from such fs as a malicious
> input.  Such mounted fs would try to consider the data on disk as
> untrusted and to be as robust as possible, e.g. check against
> "/"-filenames, against corrupted fs structures, etc.  I'd be happy to
> hear opinions about the usefulness of this feature.

Something else I was noticing is that fsck does not also enforce the correct naming 
constraints. Maybe what can be done is fix fsck and force it to scan the file system 
before making it accessible.

-Steve

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.