fs/ntfs3: Add rough attr alloc_size check
[ Upstream commit c4a8ba3342 ]
Reported-by: syzbot+c6d94bedd910a8216d25@syzkaller.appspotmail.com
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
898c8795ec
commit
e91fbb21f2
@@ -331,6 +331,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
|
||||
|
||||
if (attr->nres.c_unit)
|
||||
return NULL;
|
||||
|
||||
if (alloc_size > mi->sbi->volume.size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return attr;
|
||||
|
||||
Reference in New Issue
Block a user