]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
quota: Don't overflow quota file offsets
authorJan Kara <jack@suse.cz>
Mon, 2 Nov 2020 15:32:10 +0000 (16:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jan 2021 13:48:39 +0000 (14:48 +0100)
commite2926630f6539b6809547ae51a878d0f3d8cb74e
tree9020a24339e3f18a6fbdd596aaa719d852a4362a
parent1842dde0dd13250a5b019e7d77153163feab353f
quota: Don't overflow quota file offsets

[ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ]

The on-disk quota format supports quota files with upto 2^32 blocks. Be
careful when computing quota file offsets in the quota files from block
numbers as they can overflow 32-bit types. Since quota files larger than
4GB would require ~26 millions of quota users, this is mostly a
theoretical concern now but better be careful, fuzzers would find the
problem sooner or later anyway...

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/quota/quota_tree.c