Skip to content

Commit

Permalink
quota: info leak in quota_getquota()
Browse files Browse the repository at this point in the history
The if_dqblk struct has a 4 byte hole at the end of the struct so
uninitialized stack information is leaked to user space.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Dan Carpenter authored and Jan Kara committed Nov 4, 2013
1 parent 1ce0aa8 commit 18da65e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/quota/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static int quota_setinfo(struct super_block *sb, int type, void __user *addr)

static void copy_to_if_dqblk(struct if_dqblk *dst, struct fs_disk_quota *src)
{
memset(dst, 0, sizeof(*dst));
dst->dqb_bhardlimit = src->d_blk_hardlimit;
dst->dqb_bsoftlimit = src->d_blk_softlimit;
dst->dqb_curspace = src->d_bcount;
Expand Down

0 comments on commit 18da65e

Please sign in to comment.