Commit 18da65e7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jan Kara

quota: info leak in quota_getquota()

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 1ce0aa80
...@@ -117,6 +117,7 @@ static int quota_setinfo(struct super_block *sb, int type, void __user *addr) ...@@ -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) 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_bhardlimit = src->d_blk_hardlimit;
dst->dqb_bsoftlimit = src->d_blk_softlimit; dst->dqb_bsoftlimit = src->d_blk_softlimit;
dst->dqb_curspace = src->d_bcount; dst->dqb_curspace = src->d_bcount;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment