linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Kangjie Lu <kangjielu@gmail.com>
Cc: Larry.Finger@lwfinger.net, Jes.Sorensen@redhat.com,
	linux-wireless@vger.kernel.org, evel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, taesoo@gatech.edu, insu@gatech.edu,
	csong84@gatech.edu, Kangjie Lu <kjlu@gatech.edu>
Subject: Re: [PATCH] fix infoleak in ioctl_cfg80211
Date: Tue, 3 May 2016 16:05:13 -0700	[thread overview]
Message-ID: <20160503230513.GA15078@kroah.com> (raw)
In-Reply-To: <1462313506-7742-1-git-send-email-kjlu@gatech.edu>

On Tue, May 03, 2016 at 06:11:46PM -0400, Kangjie Lu wrote:
> "mac" is an array allocated in stack without being initialized,
> and will be sent out via "nla_put". The dump_station() is supposed
> to initialize the mac address; otherwise, sensitive data in kernel
> stack will be leaked. To fix this, either initialize it (e.g.,
> memset) or completely remove this dump_station().
> 
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
> ---
>  drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
> index 12d1844..44a1582 100644
> --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
> @@ -2926,6 +2926,7 @@ static int cfg80211_rtw_dump_station(struct wiphy *wiphy,
>  
>  	/* TODO: dump scanned queue */
>  
> +	memset(mac, 0, ETH_ALEN);
>  	return -ENOENT;
>  }

This isn't needed, as it returns -ENOENT and so mac never gets used.

thanks,

greg k-h

      reply	other threads:[~2016-05-03 23:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 22:11 [PATCH] fix infoleak in ioctl_cfg80211 Kangjie Lu
2016-05-03 23:05 ` Greg KH [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=20160503230513.GA15078@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=csong84@gatech.edu \
    --cc=evel@driverdev.osuosl.org \
    --cc=insu@gatech.edu \
    --cc=kangjielu@gmail.com \
    --cc=kjlu@gatech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=taesoo@gatech.edu \
    /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).