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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Jul 2022 06:02:43 +0000
From:   Harshad Shirwadkar <harshadshirwadkar@...il.com>
To:     linux-ext4@...r.kernel.org
Cc:     tytso@....edu, Harshad Shirwadkar <harshadshirwadkar@...il.com>
Subject: [RFC PATCH v4 5/8] ext4: ext4_fc_track_inode() bug fix

This patch fixes a bug in ext4_fc_track_inode() where we should not
immediately return from ext4_fc_track_inode() if the inode is on fast
commit list. It is possible that the inode is on fast commit list and
then somebody calls ext4_fc_track_inode(). If we immediately return if
the inode is on fc list, we will let the caller modify the inode while
it is being committed.

Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@...il.com>
---
 fs/ext4/fast_commit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index 608ae16afcd6..0307e21e5b29 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -611,8 +611,7 @@ void ext4_fc_track_inode(handle_t *handle, struct inode *inode)
 
 	if (!test_opt2(inode->i_sb, JOURNAL_FAST_COMMIT) ||
 	    (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) ||
-		ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE) ||
-		!list_empty(&ei->i_fc_list))
+	    ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE))
 		return;
 
 	while (ext4_test_inode_state(inode, EXT4_STATE_FC_COMMITTING)) {
-- 
2.37.0.170.g444d1eabd0-goog

Powered by blists - more mailing lists