Bug in stackable filesystems like wrapfs, ecryptfs etc.

Lino Sanfilippo <[email protected]> Thu, 18 Jun 2009 18:27:35 +0200
Newsgroups gmane.linux.dazuko.devel
Message-ID <[email protected]>

Hello,

our company is working with the stackable filesystem dazukofs that is 
based on wrapfs from the FiST
project.

We discovered a bug in the case that a stackable filesystem like 
ecryptfs, wrapfs or dazukofs,
is stacked upon itself, i.e by mounting it several times at the same 
mount point.

An access to a file (i.e. by touching it) through 3 or more layers of 
one of those stackable filesystems,
results in an Oops.
The reason is the usage of the lookup_one_len() function, which passes a 
NULL nameidata
to the lower filesystem if it has the d_revalidate() dentry operation 
defined.
 
Thus, stackable filesystem like wrapfs, ecryptfs and dazukofs assume 
that the filesystem below it handles
NULL values for the nameidata correctly, which might not be true:

Ironically these stackable filesystems themselves, are not prepared to 
handle those NULL values.
So if the underlaying filesystem is one of those stackable filesystems, 
it might try to access
the nameidata struct and the Oops occurs due to the access of a NULL 
pointer.

So I would like to know:
Are there any concerns with replacing the lookup_one_len() function with 
vfs_lookup()
to avoid the problem of the NULL nameidata?

Thx in advance and
best regards,

Lino

-

 

Geschäftsführender Gesellschafter: Tjark Auerbach
Sitz der Gesellschaft: Tettnang
Handelsregister: Amtsgericht Ulm, HRB 630992
ALLGEMEINE GESCHÄFTSBEDINGUNGEN
Es gelten unsere Allgemeinen Geschäftsbedingungen
(AGB). Sie finden sie in der jeweils gültigen Fassung
im Internet unter http://www.avira.de/agb
***************************************************