Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 24f6f50

Browse files
fs/ntfs3: Mark volume as dirty if xattr is broken
Mark a volume as corrupted if the name length exceeds the space occupied by ea. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 40bb3c5 commit 24f6f50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/ntfs3/xattr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,11 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer,
219219
if (!ea->name_len)
220220
break;
221221

222-
if (ea->name_len > ea_size)
222+
if (ea->name_len > ea_size) {
223+
ntfs_set_state(ni->mi.sbi, NTFS_DIRTY_ERROR);
224+
err = -EINVAL; /* corrupted fs */
223225
break;
226+
}
224227

225228
if (buffer) {
226229
/* Check if we can use field ea->name */

0 commit comments

Comments
 (0)