Skip to content
Commit e51d68e7 authored by Anant Thazhemadam's avatar Anant Thazhemadam Committed by Jan Kara
Browse files

fs: quota: fix array-index-out-of-bounds bug by passing correct argument to...

fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode()

When dquot_resume() was last updated, the argument that got passed
to vfs_cleanup_quota_inode was incorrectly set.

If type = -1 and dquot_load_quota_sb() returns a negative value,
then vfs_cleanup_quota_inode() gets called with -1 passed as an
argument, and this leads to an array-index-out-of-bounds bug.

Fix this issue by correctly passing the arguments.

Fixes: ae45f07d ("quota: Simplify dquot_resume()")
Link: https://lore.kernel.org/r/20201208194338.7064-1-anant.thazhemadam@gmail.com


Reported-by: default avatar <syzbot+2643e825238d7aabb37f@syzkaller.appspotmail.com>
Tested-by: default avatar <syzbot+2643e825238d7aabb37f@syzkaller.appspotmail.com>
CC: stable@vger.kernel.org
Signed-off-by: default avatarAnant Thazhemadam <anant.thazhemadam@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent d24396c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment