Re: [Bugme-new] [Bug 34732] New: BUG: unable to handle kernel NULL pointer dereference at 00000020

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tyler Hicks <tyhicks@xxxxxxxxxxxxxxxxxx> writes:

> On Mon May 09, 2011 at 12:07:07PM -0700, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>> I assume this is a post-2.6.38 regression.
>> 
>> I can't begin to think what might cause this.  Is it reproducible?
>
> I'd bet on e7c0a167860620bd2938366896964f729ddaeaaa
>
> eCryptfs uses lookup_one_len() to lookup lower files, which means that
> the lower filesystem's d_revalidate() can get a NULL nameidata pointer.
> That commit dropped the check on nd before dereferencing it.

Looks like you hit the nail right on the head.

Following patch should fix it.

Thanks,
Miklos


commit d24339059d640f108c08ba99ef30e3bafa10f8e4
Author: Miklos Szeredi <mszeredi@xxxxxxx>
Date:   Tue May 10 17:35:58 2011 +0200

    fuse: fix oops in revalidate when called with NULL nameidata
    
    Some cases (e.g. ecryptfs) can call ->dentry_revalidate with NULL
    nameidata.
    
    https://bugzilla.kernel.org/show_bug.cgi?id=34732
    
    Tyler Hicks pointed out that this bug was introduced by commit
    e7c0a16786 "fuse: make fuse_dentry_revalidate() RCU aware"
    
    Reported-by: Witold Baryluk <baryluk@xxxxxxxxxxxxxxxx>
    Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxx>

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index c6ba49b..b32eb29 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -174,7 +174,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
 		if (!inode)
 			return 0;
 
-		if (nd->flags & LOOKUP_RCU)
+		if (nd && (nd->flags & LOOKUP_RCU))
 			return -ECHILD;
 
 		fc = get_fuse_conn(inode);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux