fs/ntfs3: Add rough attr alloc_size check
BugLink: https://bugs.launchpad.net/bugs/2099996 [ Upstream commit c4a8ba334262e9a5c158d618a4820e1b9c12495c ] 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> CVE-2024-50246 Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
f963d98f5c
commit
2e84d7f874
@@ -330,6 +330,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
|
||||
} else {
|
||||
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