diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-06-24 19:12:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:56:10 -0700 |
commit | 34fbb97c07fce301164d5902639d04ce4f6f3fd5 (patch) | |
tree | 60f53e9a37203c9b3c5fa6a36c204f62194f5291 /drivers/staging/vt6655 | |
parent | 81a589555f4951d4b01fb66c0dc2092fa1b6c4ac (diff) | |
download | op-kernel-dev-34fbb97c07fce301164d5902639d04ce4f6f3fd5.zip op-kernel-dev-34fbb97c07fce301164d5902639d04ce4f6f3fd5.tar.gz |
staging: vt6655: info leak in ioctl
The SCmdLinkStatus struct has a couple holes. There is one between
->bLink and ->wBSSType, and another between ->abySSID and ->uChannel.
I've added a memset() to initialize the struct to zero. Since we don't
need to clear abySSID any more so I've removed that memset. It was
wrong anyway: abySSID has "SSID_MAXLEN + 2" (34) bytes, not
"WLAN_SSID_MAXLEN + 1" (33).
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/ioctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 2ae8116..46e0e41 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -64,7 +64,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) PKnownBSS pBSS; PKnownNodeDB pNode; unsigned int ii, jj; - SCmdLinkStatus sLinkStatus; unsigned char abySuppRates[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16}; unsigned char abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; unsigned long dwKeyIndex = 0; @@ -245,10 +244,12 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; break; - case WLAN_CMD_GET_LINK: + case WLAN_CMD_GET_LINK: { + SCmdLinkStatus sLinkStatus; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_GET_LINK status.\n"); - memset(sLinkStatus.abySSID, 0 , WLAN_SSID_MAXLEN + 1); + memset(&sLinkStatus, 0, sizeof(sLinkStatus)); if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) sLinkStatus.wBSSType = ADHOC; @@ -277,7 +278,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) break; } break; - + } case WLAN_CMD_GET_LISTLEN: cbListCount = 0; pBSS = &(pMgmt->sBSSList[0]); |