mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
fs/ntfs3: Fixed overflow check in mi_enum_attr()
commit 652cfeb43d6b9aba5c7c4902bed7a7340df131fb 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:
committed by
Greg Kroah-Hartman
parent
1403991a40
commit
e99faa9735
@@ -273,7 +273,7 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
|
|||||||
if (t16 > asize)
|
if (t16 > asize)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (t16 + le32_to_cpu(attr->res.data_size) > asize)
|
if (le32_to_cpu(attr->res.data_size) > asize - t16)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (attr->name_len &&
|
if (attr->name_len &&
|
||||||
|
|||||||
Reference in New Issue
Block a user