summaryrefslogtreecommitdiff
path: root/fs/ntfs3/file.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-10-17 17:04:39 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-01-29 12:05:08 +0300
commitb2dd7b953c25ffd5912dda17e980e7168bebcf6c (patch)
tree107fedcb46e7744f06a0e26a57f8a917f0b8ba39 /fs/ntfs3/file.c
parentd68968440b1a75dee05cfac7f368f1aa139e1911 (diff)
downloadlinux-b2dd7b953c25ffd5912dda17e980e7168bebcf6c.tar.xz
fs/ntfs3: Fix an NULL dereference bug
The issue here is when this is called from ntfs_load_attr_list(). The "size" comes from le32_to_cpu(attr->res.data_size) so it can't overflow on a 64bit systems but on 32bit systems the "+ 1023" can overflow and the result is zero. This means that the kmalloc will succeed by returning the ZERO_SIZE_PTR and then the memcpy() will crash with an Oops on the next line. Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/file.c')
0 files changed, 0 insertions, 0 deletions