linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Zhao Qiang <qiang.zhao@nxp.com>,
	netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl()
Date: Thu, 14 Jul 2016 12:52:16 +0200	[thread overview]
Message-ID: <57876EE0.10603@bfs.de> (raw)
In-Reply-To: <20160714103415.GE18175@mwanda>



Am 14.07.2016 12:34, schrieb Dan Carpenter:
> There is a 2 byte struct whole after line.loopback so we need to clear
> that out to avoid disclosing stack information.
> 
> Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
> index 19174ac..7608561 100644
> --- a/drivers/net/wan/fsl_ucc_hdlc.c
> +++ b/drivers/net/wan/fsl_ucc_hdlc.c
> @@ -635,6 +635,7 @@ static int uhdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
>  			ifr->ifr_settings.size = size; /* data size wanted */
>  			return -ENOBUFS;
>  		}
> +		memset(&line, 0, sizeof(line));
>  		line.clock_type = priv->clocking;
>  		line.clock_rate = 0;
>  		line.loopback = 0;


In this case
  		line.clock_rate = 0;
 		line.loopback = 0;

are not need any more and can be removed
except like them to have for documentation or so.

re,
 wh

  reply	other threads:[~2016-07-14 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 10:34 [patch -next] wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl() Dan Carpenter
2016-07-14 10:52 ` walter harms [this message]
2016-07-14 11:16   ` [patch v2 " Dan Carpenter
2016-07-15 18:43     ` David Miller
2016-07-14 11:17   ` [patch " Dan Carpenter

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=57876EE0.10603@bfs.de \
    --to=wharms@bfs.de \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=qiang.zhao@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).