lkml.org 
[lkml]   [2005]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] FUSE: inode leak fix
From
Date
Hi Andrew!

This patch fixes an inode leak in fuse_get_dentry(). With libfuse
this practically never triggers, but a DoS exploit could be written.

Please Apply.

Thanks,
Miklos

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>

diff -rup linux-2.6.11-mm1/fs/fuse/inode.c linux-fuse/fs/fuse/inode.c
--- linux-2.6.11-mm1/fs/fuse/inode.c 2005-03-04 23:26:59.000000000 +0100
+++ linux-fuse/fs/fuse/inode.c 2005-03-04 23:32:36.000000000 +0100
@@ -446,8 +446,12 @@ static struct dentry *fuse_get_dentry(st
return ERR_PTR(-ESTALE);

inode = ilookup5(sb, nodeid, fuse_inode_eq, &nodeid);
- if (!inode || inode->i_generation != generation)
+ if (!inode)
return ERR_PTR(-ESTALE);
+ if (inode->i_generation != generation) {
+ iput(inode);
+ return ERR_PTR(-ESTALE);
+ }

entry = d_alloc_anon(inode);
if (!entry) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.032 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site