mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-14 21:29:37 +02:00
fs/ntfs3: Mark volume as dirty if xattr is broken
[ Upstream commit 24f6f5020b
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
92e494a756
commit
aa8b1d6073
|
@ -219,8 +219,11 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer,
|
|||
if (!ea->name_len)
|
||||
break;
|
||||
|
||||
if (ea->name_len > ea_size)
|
||||
if (ea->name_len > ea_size) {
|
||||
ntfs_set_state(ni->mi.sbi, NTFS_DIRTY_ERROR);
|
||||
err = -EINVAL; /* corrupted fs */
|
||||
break;
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
/* Check if we can use field ea->name */
|
||||
|
|
Loading…
Reference in New Issue
Block a user