mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
fs/ntfs3: Fixed overflow check in mi_enum_attr()
commit 652cfeb43d
upstream.
Reported-by: Robert Morris <rtm@csail.mit.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1403991a40
commit
e99faa9735
@ -273,7 +273,7 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
|
||||
if (t16 > asize)
|
||||
return NULL;
|
||||
|
||||
if (t16 + le32_to_cpu(attr->res.data_size) > asize)
|
||||
if (le32_to_cpu(attr->res.data_size) > asize - t16)
|
||||
return NULL;
|
||||
|
||||
if (attr->name_len &&
|
||||
|
Loading…
Reference in New Issue
Block a user