diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-01 06:21:54 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-11-04 08:16:55 -0500 |
commit | 18da65e7d30a76ab3ca0ccd2b7ca0690f80f28e4 (patch) | |
tree | 007299bae59b813451ae918e3ab5cdc2486c1494 /fs/quota | |
parent | 1ce0aa802c4cbe6dfe2c7fa95c839d75a509c9a5 (diff) |
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')
-rw-r--r-- | fs/quota/quota.c | 1 |
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) | |||
117 | 117 | ||
118 | static void copy_to_if_dqblk(struct if_dqblk *dst, struct fs_disk_quota *src) | 118 | static void copy_to_if_dqblk(struct if_dqblk *dst, struct fs_disk_quota *src) |
119 | { | 119 | { |
120 | memset(dst, 0, sizeof(*dst)); | ||
120 | dst->dqb_bhardlimit = src->d_blk_hardlimit; | 121 | dst->dqb_bhardlimit = src->d_blk_hardlimit; |
121 | dst->dqb_bsoftlimit = src->d_blk_softlimit; | 122 | dst->dqb_bsoftlimit = src->d_blk_softlimit; |
122 | dst->dqb_curspace = src->d_bcount; | 123 | dst->dqb_curspace = src->d_bcount; |