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]
Date:	Tue, 1 May 2007 19:23:14 +0100
From:	Stephen Mollett <molletts@...oo.com>
To:	bfennema@...con.csc.calpoly.edu
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.21] udf: Decrement correct link count in udf_rmdir

It appears that a minor thinko occurred in udf_rmdir and the (already-cleared) 
link count on the directory that is being removed was being decremented 
instead of the link count on its parent directory. This gives rise to lots of 
kernel messages similar to:

UDF-fs warning (device loop1): udf_rmdir: empty directory has nlink != 2 (8)

when removing directory trees. No other ill effects have been observed but I 
guess it could theoretically result in the link count overflowing on a very 
long-lived, much modified directory.

Signed-off-by: Stephen Mollett <molletts@...oo.com>
---

Patch applies cleanly to latest git snapshot and other recent 2.6 kernels.

Please CC: me as I'm not currently subscribed to linux-kernel.

First attempt at formally submitting a kernel patch - apologies if I've cocked 
something up - please be nice :-)


--- linux-2.6.21/fs/udf/namei.c.orig	2007-05-01 18:52:02.000000000 +0100
+++ linux-2.6.21/fs/udf/namei.c	2007-05-01 18:53:00.000000000 +0100
@@ -878,7 +878,7 @@ static int udf_rmdir(struct inode * dir,
 			inode->i_nlink);
 	clear_nlink(inode);
 	inode->i_size = 0;
-	inode_dec_link_count(inode);
+	inode_dec_link_count(dir);
 	inode->i_ctime = dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
 	mark_inode_dirty(dir);
 
-
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