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: <20250717065111.828535-1-adilger@dilger.ca>
Date: Thu, 17 Jul 2025 00:51:03 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org,
	Andreas Dilger <adilger@...ger.ca>,
	Andreas Dilger <adilger@...mcloud.com>,
	Li Dongyang <dongyangli@....com>
Subject: [PATCH] ext2fs: fix fast symlink blocks check

Use ext4_inode_is_fast_symlink() in ext2fs_inode_has_valid_blocks2()
instead of depending exclusively on i_blocks == 0 to determine
if an inode is a fast symlink. Otherwise, if a fast symlink has a
large external xattr inode that increases i_blocks, it will be
incorrectly reported as having invalid blocks.

Change-Id: Ibde2348da39401601abedd603bd7e4ef97091abe
Fixes: 0684a4f33 ("Overhaul extended attribute handling")
Signed-off-by: Andreas Dilger <adilger@...mcloud.com>
Reviewed-by: Li Dongyang <dongyangli@....com>
Reviewed-on: https://review.whamcloud.com/59871
Lustre-bug-id: https://jira.whamcloud.com/browse/LU-19121
---
 lib/ext2fs/valid_blk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ext2fs/valid_blk.c b/lib/ext2fs/valid_blk.c
index db5d90ae4..332e9c66a 100644
--- a/lib/ext2fs/valid_blk.c
+++ b/lib/ext2fs/valid_blk.c
@@ -43,6 +43,7 @@ int ext2fs_inode_has_valid_blocks2(ext2_filsys fs, struct ext2_inode *inode)
 			/* With no EA block, we can rely on i_blocks */
 			if (inode->i_blocks == 0)
 				return 0;
+			return !ext2fs_is_fast_symlink(inode);
 		} else {
 			/* With an EA block, life gets more tricky */
 			if (inode->i_size >= EXT2_N_BLOCKS*4)
-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ