public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] quota: info leak in quota_getquota()
Date: Mon, 4 Nov 2013 14:16:19 +0100	[thread overview]
Message-ID: <20131104131619.GA8566@quack.suse.cz> (raw)
In-Reply-To: <20131101102154.GC29795@longonot.mountain>

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@oracle.com>
  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@suse.cz>
SUSE Labs, CR

      reply	other threads:[~2013-11-04 13:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 10:21 [patch] quota: info leak in quota_getquota() Dan Carpenter
2013-11-04 13:16 ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131104131619.GA8566@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox