Skip to content

Commit effac69

Browse files
aalexandrovichgregkh
authored andcommitted
fs/ntfs3: Add rough attr alloc_size check
commit c4a8ba334262e9a5c158d618a4820e1b9c12495c upstream. Reported-by: [email protected] Signed-off-by: Konstantin Komarov <[email protected]> Signed-off-by: Bin Lan <[email protected]> Signed-off-by: He Zhe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent dbd3e4a commit effac69

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
@@ -325,6 +325,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
325325
} else {
326326
if (attr->nres.c_unit)
327327
return NULL;
328+
329+
if (alloc_size > mi->sbi->volume.size)
330+
return NULL;
328331
}
329332

330333
return attr;

0 commit comments

Comments
 (0)