]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/ntfs3: Fix a couple integer overflows on 32bit systems
authorDan Carpenter <dan.carpenter@linaro.org>
Sun, 16 Feb 2025 20:52:00 +0000 (23:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:32:01 +0000 (14:32 +0200)
commit0922d86a7a6032cb1694eab0b44b861bd33ba8d5
tree2eaccc28bd757e10342559f5d5a919a33f2f9c1f
parent7041fafd0dc69c1d1429637c9c717418bde85a8d
fs/ntfs3: Fix a couple integer overflows on 32bit systems

[ Upstream commit 5ad414f4df2294b28836b5b7b69787659d6aa708 ]

On 32bit systems the "off + sizeof(struct NTFS_DE)" addition can
have an integer wrapping issue.  Fix it by using size_add().

Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/index.c