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, 17 Sep 2013 23:08:51 +0800
From:	Boxi Liu <boxi10liu@...il.com>
To:	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
	Theodore Tso <tytso@....edu>, Robin Dong <sanbai@...bao.com>,
	"tm@....ma" <tm@....ma>, "lewis.liulei" <lewis.liulei@...wei.com>,
	pamirs <pamirs@....com>
Subject: fix the ext4_read_inline_dir return value

hi,
there may be a bug in ext4_read_inline_dir() function with inline_data feature.
when I recursion call a sys_old_readdir to read a direntry's
sub_dentry,I find that the ext4_read_inline_dir return the len of the
inline_data ,but in the no inline_data case,it will return 0.It is
inconsistent.
So I try to make a patch to fix it.

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index d9ecbf1..3ea39cd 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1441,7 +1441,7 @@ int ext4_read_inline_dir(struct file *file,
  up_read(&EXT4_I(inode)->xattr_sem);
  if (ret < 0)
  goto out;
-
+   ret = 0;
  sb = inode->i_sb;
  parent_ino = le32_to_cpu(((struct ext4_dir_entry_2 *)dir_buf)->inode);
  offset = ctx->pos;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ