quota: Don't overflow quota file offsets
authorJan Kara <jack@suse.cz>
Mon, 2 Nov 2020 15:32:10 +0000 (16:32 +0100)
committerJan Kara <jack@suse.cz>
Tue, 3 Nov 2020 10:17:00 +0000 (11:17 +0100)
commit10f04d40a9fa29785206c619f80d8beedb778837
tree9351d9208e5a95fef22ef849c4903d105fdd19e4
parenta219ee41899bcfabd63cd6617256d5be13a7f4b6
quota: Don't overflow quota file offsets

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>
fs/quota/quota_tree.c