Commit bf6ce07c authored by Zhang Yi's avatar Zhang Yi Committed by Yang Yingliang
Browse files

quota: check block number when reading the block in quota file

hulk inclusion
category: bugfix
bugzilla: 182754
CVE: NA
---------------------------

The block number in the quota tree on disk should be smaller than the
v2_disk_dqinfo.dqi_blocks. If the quota file was corrupted, we may be
allocating an 'allocated' block and that would lead to a loop in a tree,
which will probably trigger oops later. This patch adds a check for the
block number in the quota tree to prevent such potential issue.

Link: https://lore.kernel.org/r/20211008093821.1001186-2-yi.zhang@huawei.com


Signed-off-by: default avatarZhang Yi <yi.zhang@huawei.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarYang Erkun <yangerkun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 4be09793
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment