[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423144155.10219-2-almaz.alexandrovich@paragon-software.com>
Date: Tue, 23 Apr 2024 17:41:55 +0300
From: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
To: <ntfs3@...ts.linux.dev>
CC: <linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
<stable@...r.kernel.org>
Subject: [PATCH] fs/ntfs3: Break dir enumeration if directory contents error
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
Cc: stable@...r.kernel.org
---
fs/ntfs3/dir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ntfs3/dir.c b/fs/ntfs3/dir.c
index 5cf3d9decf64..45e556fd7c54 100644
--- a/fs/ntfs3/dir.c
+++ b/fs/ntfs3/dir.c
@@ -475,6 +475,7 @@ static int ntfs_readdir(struct file *file, struct dir_context *ctx)
vbo = (u64)bit << index_bits;
if (vbo >= i_size) {
ntfs_inode_err(dir, "Looks like your dir is corrupt");
+ ctx->pos = eod;
err = -EINVAL;
goto out;
}
--
2.34.1
Powered by blists - more mailing lists