]> 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:37:33 +0000 (14:37 +0200)
commit0dfe700fbd3525f30a36ffbe390a5b9319bd009a
treee32b9bbf03fe813142c52116e02d17951fa79e11
parent0566a11d5e655c4c6cc306557fc9220e93b2c32c
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