]> 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:45:01 +0000 (14:45 +0100)
commit75f1bd7955f17cf15412165d25f03df7d659568e
treef514c32056c3cdefa9a951ec2c5c20412f6a004b
parentbea7f4d1ffa33ced2801947eb70e400387b07575
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