linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kangjie Lu <kangjielu@gmail.com>
To: Larry.Finger@lwfinger.net
Cc: Jes.Sorensen@redhat.com, gregkh@linuxfoundation.org,
	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: [PATCH] fix infoleak in ioctl_cfg80211
Date: Tue,  3 May 2016 18:11:46 -0400	[thread overview]
Message-ID: <1462313506-7742-1-git-send-email-kjlu@gatech.edu> (raw)

"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;
 }
 
-- 
1.9.1


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 22:11 Kangjie Lu [this message]
2016-05-03 23:05 ` [PATCH] fix infoleak in ioctl_cfg80211 Greg KH

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=1462313506-7742-1-git-send-email-kjlu@gatech.edu \
    --to=kangjielu@gmail.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=csong84@gatech.edu \
    --cc=evel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=insu@gatech.edu \
    --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).