summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-07-19 22:04:46 +0000
committerstsp <stsp@openbsd.org>2017-07-19 22:04:46 +0000
commit2c29abd8d70d211a6147518609f72322c7698cc1 (patch)
tree24c76f4194925c8b38febeb4a4aa63488aff11ed
parentImplement the enter_ddb() "accessop" here as well. (diff)
downloadwireguard-openbsd-2c29abd8d70d211a6147518609f72322c7698cc1.tar.xz
wireguard-openbsd-2c29abd8d70d211a6147518609f72322c7698cc1.zip
Plug an information leak in ieee80211_node2req().
Problem reported by Ilja Van Sprundel. ok tb@
-rw-r--r--sys/net80211/ieee80211_ioctl.c6
-rw-r--r--sys/net80211/ieee80211_ioctl.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 225e59c4007..279f6c54e03 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.c,v 1.52 2017/03/23 04:10:10 tb Exp $ */
+/* $OpenBSD: ieee80211_ioctl.c,v 1.53 2017/07/19 22:04:46 stsp Exp $ */
/* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */
/*-
@@ -64,6 +64,10 @@ ieee80211_node2req(struct ieee80211com *ic, const struct ieee80211_node *ni,
{
uint8_t rssi;
+ memset(nr, 0, sizeof(*nr));
+
+ strlcpy(nr->nr_ifname, ic->ic_if.if_xname, sizeof(nr->nr_ifname));
+
/* Node address and name information */
IEEE80211_ADDR_COPY(nr->nr_macaddr, ni->ni_macaddr);
IEEE80211_ADDR_COPY(nr->nr_bssid, ni->ni_bssid);
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
index 0151b6962db..56629a4cac5 100644
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.h,v 1.28 2017/03/11 13:22:36 stsp Exp $ */
+/* $OpenBSD: ieee80211_ioctl.h,v 1.29 2017/07/19 22:04:46 stsp Exp $ */
/* $NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $ */
/*-
@@ -315,8 +315,6 @@ struct ieee80211_nodereq {
u_int8_t nr_tstamp[8]; /* from last received beacon */
u_int16_t nr_intval; /* beacon interval */
u_int16_t nr_capinfo; /* capabilities */
- u_int16_t nr_fhdwell; /* FH only */
- u_int8_t nr_fhindex; /* FH only */
u_int8_t nr_erp; /* 11g only */
u_int8_t nr_pwrsave; /* power saving mode */
u_int16_t nr_associd; /* assoc response */