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-prev] [day] [month] [year] [list]
Date:	Mon, 25 Aug 2014 22:49:20 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	"Darrick J. Wong" <darrick.wong@...cle.com>
Cc:	Zheng Liu <gnehzuil.liu@...il.com>,
	linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fix same-dir rename when inline data directory
 overflows

On Mon, Aug 25, 2014 at 12:40:31PM -0700, Darrick J. Wong wrote:
> When performing a same-directory rename, it's possible that adding or
> setting the new directory entry will cause the directory to overflow
> the inline data area, which causes the directory to be converted to an
> extent-based directory.  Under this circumstance it is necessary to
> re-read the directory when deleting the old dirent because the "old
> directory" context still points to i_block in the inode table, which
> is now an extent tree root!  The delete fails with an FS error, and
> the subsequent fsck complains about incorrect link counts and
> hardlinked directories.
> 
> Test case (originally found with flat_dir_test in the metadata_csum
> test program):
> 
> # mkfs.ext4 -O inline_data /dev/sda
> # mount /dev/sda /mnt
> # mkdir /mnt/x
> # touch /mnt/x/changelog.gz /mnt/x/copyright /mnt/x/README.Debian
> # sync
> # for i in /mnt/x/*; do mv $i $i.longer; done
> # ls -la /mnt/x/
> total 0
> -rw-r--r-- 1 root root 0 Aug 25 12:03 changelog.gz.longer
> -rw-r--r-- 1 root root 0 Aug 25 12:03 copyright
> -rw-r--r-- 1 root root 0 Aug 25 12:03 copyright.longer
> -rw-r--r-- 1 root root 0 Aug 25 12:03 README.Debian.longer
> 
> (Hey!  Why are there four files now??)
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>

Thanks, applied.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists