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.comSigned-off-by: NZhang Yi <yi.zhang@huawei.com> Cc: stable@kernel.org Signed-off-by: NJan Kara <jack@suse.cz> Reviewed-by: NYang Erkun <yangerkun@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录