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>] [day] [month] [year] [list]
Message-Id: <1163085886.21469.47.camel@dantu.rdu.redhat.com>
Date:	Thu, 09 Nov 2006 10:24:46 -0500
From:	Jeff Layton <jlayton@...hat.com>
To:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	akpm@...l.org
Subject: [PATCH 3/3] new_inode_autonum: fix up possible i_ino collision in
	simple_fill_super()

simple_fill_super() looked like a bug waiting to happen.  It is fairly hard to
trigger, but still. This should fix it, although in a fairly crude manner.
    
Signed-off-by: Jörn Engel <joern@...nheim.fh-wedel.de>
Signed-off-by: Jeff Layton <jlayton@...hat.com>

diff --git a/fs/libfs.c b/fs/libfs.c
index bd08e0e..477c012 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -373,6 +373,10 @@ int simple_fill_super(struct super_block
 	inode = new_inode(s);
 	if (!inode)
 		return -ENOMEM;
+	/* ino must not collide with any ino assigned in the loop below.
+	 * This value is arbitrary but should be "big enough" to avoid
+	 * collisions. */
+	inode->i_ino = 0x8000000;
 	inode->i_mode = S_IFDIR | 0755;
 	inode->i_uid = inode->i_gid = 0;
 	inode->i_blocks = 0;


-
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