fs/ntfs3: Add rough attr alloc_size check

Reported-by: syzbot+c6d94bedd910a8216d25@syzkaller.appspotmail.com
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
Konstantin Komarov 2024-08-19 16:26:59 +03:00
parent 1fd21919de
commit c4a8ba3342
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -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;