diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2024-08-19 15:26:59 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2024-09-03 15:58:43 +0200 |
commit | c4a8ba334262e9a5c158d618a4820e1b9c12495c (patch) | |
tree | c9fd517ae00223730ea8ffc7f8a815295127c220 /fs/ntfs3/record.c | |
parent | fs/ntfs3: Stale inode instead of bad (diff) | |
download | linux-c4a8ba334262e9a5c158d618a4820e1b9c12495c.tar.xz linux-c4a8ba334262e9a5c158d618a4820e1b9c12495c.zip |
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>
Diffstat (limited to 'fs/ntfs3/record.c')
-rw-r--r-- | fs/ntfs3/record.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c index 2a375247b3c0..427c71be0f08 100644 --- a/fs/ntfs3/record.c +++ b/fs/ntfs3/record.c @@ -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; |