mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
xfs: Sanity check flags of Q_XQUOTARM call
commit3dd4d40b42
upstream. Flags passed to Q_XQUOTARM were not sanity checked for invalid values. Fix that. Fixes:9da93f9b7c
("xfs: fix Q_XQUOTARM ioctl") Reported-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com> Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8bac50406c
commit
e71ab588b0
1 changed files with 3 additions and 0 deletions
|
@ -214,6 +214,9 @@ xfs_fs_rm_xquota(
|
|||
if (XFS_IS_QUOTA_ON(mp))
|
||||
return -EINVAL;
|
||||
|
||||
if (uflags & ~(FS_USER_QUOTA | FS_GROUP_QUOTA | FS_PROJ_QUOTA))
|
||||
return -EINVAL;
|
||||
|
||||
if (uflags & FS_USER_QUOTA)
|
||||
flags |= XFS_DQ_USER;
|
||||
if (uflags & FS_GROUP_QUOTA)
|
||||
|
|
Loading…
Reference in a new issue