]> 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>
Sat, 9 Jan 2021 12:35:50 +0000 (13:35 +0100)
commit33930a67bdd712458ffb964ebe8e6b9023ea06e8
tree960069fe7fcf651de9217791a0aa4f8748b2f13a
parent49ccaee9a72effa6bf6cb1b6c7be626c3e8bd8dc
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