lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <D8301738-5094-4666-8C4D-E26425F1AD66@fsl.cs.sunysb.edu>
Date:	Fri, 20 May 2011 01:39:37 -0400
From:	Erez Zadok <ezk@....cs.sunysb.edu>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	"viro@...IV.linux.org.uk" <viro@...IV.linux.org.uk>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"apw@...onical.com" <apw@...onical.com>,
	"nbd@...nwrt.org" <nbd@...nwrt.org>,
	"neilb@...e.de" <neilb@...e.de>,
	"hramrach@...trum.cz" <hramrach@...trum.cz>,
	"jordipujolp@...il.com" <jordipujolp@...il.com>,
	"mszeredi@...e.cz" <mszeredi@...e.cz>
Subject: Re: [PATCH 5/7] overlay filesystem (inode.c bad error path)

Miklos,

I tried your overlayfs.v9 git repo w/ racer, using two separate ext3 filesystems (one for lowerdir and another for upperdir).  I got the WARN_ON in ovl_permission to trigger within about 10 minutes of testing.  Looking at the code, I see a problem in returning w/o cleaning up an dput-ing the alias dentry.  Simple patch enclosed below.

Cheers,
Erez.


diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 3c15d54..6c70f57 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -80,7 +82,8 @@ int ovl_permission(struct inode *inode, int mask, unsigned int flags)
 	realinode = ACCESS_ONCE(realdentry->d_inode);
 	if (!realinode) {
 		WARN_ON(!(flags & IPERM_FLAG_RCU));
-		return -ENOENT;
+		err = -ENOENT;
+		goto out_dput;
 	}
 
 	if (mask & MAY_WRITE) {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ