Re: [patch] quota: info leak in quota_getquota()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 01-11-13 13:21:54, Dan Carpenter wrote:
> 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@xxxxxxxxxx>
  Thanks. I've merged the patch into my tree.

							Honza
> 
> diff --git a/fs/quota/quota.c b/fs/quota/quota.c
> index dea86e8..2b363e2 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;
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux