Skip to content

Commit c4a8ba3

Browse files
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>
1 parent 1fd2191 commit c4a8ba3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ntfs3/record.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
331331

332332
if (attr->nres.c_unit)
333333
return NULL;
334+
335+
if (alloc_size > mi->sbi->volume.size)
336+
return NULL;
334337
}
335338

336339
return attr;

0 commit comments

Comments
 (0)