summaryrefslogtreecommitdiffstats
path: root/fs/quota/quota.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-11-01 13:21:54 +0300
committerJan Kara <jack@suse.cz>2013-11-04 14:16:55 +0100
commit18da65e7d30a76ab3ca0ccd2b7ca0690f80f28e4 (patch)
tree007299bae59b813451ae918e3ab5cdc2486c1494 /fs/quota/quota.c
parent1ce0aa802c4cbe6dfe2c7fa95c839d75a509c9a5 (diff)
downloadlinux-18da65e7d30a76ab3ca0ccd2b7ca0690f80f28e4.tar.gz
linux-18da65e7d30a76ab3ca0ccd2b7ca0690f80f28e4.tar.bz2
linux-18da65e7d30a76ab3ca0ccd2b7ca0690f80f28e4.zip
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota/quota.c')
-rw-r--r--fs/quota/quota.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index dea86e8967ee..2b363e23f36e 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -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;