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: <48442820.3080400@schaufler-ca.com>
Date:	Mon, 02 Jun 2008 10:04:32 -0700
From:	Casey Schaufler <casey@...aufler-ca.com>
To:	akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
	"Ahmed S. Darwish" <darwish.07@...il.com>,
	Miklos Szeredi <miklos@...redi.hu>, lcapitulino@...driva.com.br
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH] Smack: fuse mount hang fix

From: Casey Schaufler <casey@...aufler-ca.com>

The d_instantiate hook for Smack can hang on the root
inode of a filesystem if the file system code has not
really done all the set-up. Fuse is known to encounter
this problem. This change detects an attempt to
instantiate a root inode and addresses it early in the
processing, before any attempt is made to do something
that might hang.

Signed-off-by: Casey Schaufler <casey@...aufler-ca.com>

---

security/smack/smack_lsm.c |   12 ++++++++++++
1 file changed, 12 insertions(+)

diff -uprN -X linux-2.6.25-g0530-base/Documentation/dontdiff linux-2.6.25-g0530-base/security/smack/smack_lsm.c linux-2.6.25-g0530/security/smack/smack_lsm.c
--- linux-2.6.25-g0530-base/security/smack/smack_lsm.c	2008-06-01 14:41:06.000000000 -0700
+++ linux-2.6.25-g0530/security/smack/smack_lsm.c	2008-06-01 20:29:57.000000000 -0700
@@ -1881,6 +1881,18 @@ static void smack_d_instantiate(struct d
	final = sbsp->smk_default;

	/*
+	 * If this is the root inode the superblock
+	 * may be in the process of initialization.
+	 * If that is the case use the root value out
+	 * of the superblock.
+	 */
+	if (opt_dentry->d_parent == opt_dentry) {
+		isp->smk_inode = sbsp->smk_root;
+		isp->smk_flags |= SMK_INODE_INSTANT;
+		goto unlockandout;
+	}
+
+	/*
	 * This is pretty hackish.
	 * Casey says that we shouldn't have to do
	 * file system specific code, but it does help




--
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