]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: Fix integer overflow while processing acdirmax mount option
authorMurad Masimov <m.masimov@mt-integration.ru>
Tue, 11 Mar 2025 14:22:04 +0000 (17:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:53 +0000 (14:31 +0200)
commit0c26edf477e093cefc41637f5bccc102e1a77399
tree5963ff604d339b4d9f965f38cf59edc397ee758e
parenta13351624a6af8d91398860b8c9d4cf6c8e63de5
cifs: Fix integer overflow while processing acdirmax mount option

[ Upstream commit 5b29891f91dfb8758baf1e2217bef4b16b2b165b ]

User-provided mount parameter acdirmax of type u32 is intended to have
an upper limit, but before it is validated, the value is converted from
seconds to jiffies which can lead to an integer overflow.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 4c9f948142a5 ("cifs: Add new mount parameter "acdirmax" to allow caching directory metadata")
Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/fs_context.c