From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 3.8 010/121] staging: r8712u: Fix case where ethtype was never obtained and always be checked against 0
Date: Tue, 17 Jun 2014 09:13:23 -0700 [thread overview]
Message-ID: <1403021714-16320-11-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1403021714-16320-1-git-send-email-kamal@canonical.com>
3.8.13.24 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit f764cd68d9036498f08fe8834deb6a367b5c2542 upstream.
Zero-initializing ether_type masked that the ether type would never be
obtained for 8021x packets and the comparison against eapol_type
would always fail.
Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/staging/rtl8712/rtl871x_recv.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c
index 23ec684..274c359 100644
--- a/drivers/staging/rtl8712/rtl871x_recv.c
+++ b/drivers/staging/rtl8712/rtl871x_recv.c
@@ -254,7 +254,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
struct sta_info *psta;
struct sta_priv *pstapriv;
union recv_frame *prtnframe;
- u16 ether_type = 0;
+ u16 ether_type;
pstapriv = &adapter->stapriv;
ptr = get_recvframe_data(precv_frame);
@@ -263,15 +263,14 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
psta = r8712_get_stainfo(pstapriv, psta_addr);
auth_alg = adapter->securitypriv.AuthAlgrthm;
if (auth_alg == 2) {
+ /* get ether_type */
+ ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
+ memcpy(ðer_type, ptr, 2);
+ ether_type = ntohs((unsigned short)ether_type);
+
if ((psta != NULL) && (psta->ieee8021x_blocked)) {
/* blocked
* only accept EAPOL frame */
- prtnframe = precv_frame;
- /*get ether_type */
- ptr = ptr + pfhdr->attrib.hdrlen +
- pfhdr->attrib.iv_len + LLC_HEADER_SIZE;
- memcpy(ðer_type, ptr, 2);
- ether_type = ntohs((unsigned short)ether_type);
if (ether_type == 0x888e)
prtnframe = precv_frame;
else {
--
1.9.1
next prev parent reply other threads:[~2014-06-17 16:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 16:13 [3.8.y.z extended stable] Linux 3.8.13.24 stable review Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 001/121] ACPI / EC: Clear stale EC events on Samsung systems Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 002/121] ACPI / EC: Process rather than discard events in acpi_ec_clear Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 003/121] mac80211: fix software remain-on-channel implementation Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 004/121] mac80211: exclude AP_VLAN interfaces from tx power calculation Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 005/121] parisc: fix epoll_pwait syscall on compat kernel Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 006/121] ALSA: hda/realtek - Add support of ALC288 codec Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 007/121] user namespace: fix incorrect memory barriers Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 008/121] mlx4_en: don't use napi_synchronize inside mlx4_en_netpoll Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 009/121] mei: ignore client writing state during cb completion Kamal Mostafa
2014-06-17 16:13 ` Kamal Mostafa [this message]
2014-06-17 16:13 ` [PATCH 3.8 011/121] USB: serial: ftdi_sio: add id for Brainboxes serial cards Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 012/121] Revert "USB: serial: add usbid for dell wwan card to sierra.c" Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 013/121] usb: option driver, add support for Telit UE910v2 Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 014/121] USB: cp210x: Add 8281 (Nanotec Plug & Drive) Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 015/121] USB: pl2303: add ids for Hewlett-Packard HP POS pole displays Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 016/121] USB: usb_wwan: fix handling of missing bulk endpoints Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 017/121] USB: fix crash during hotplug of PCI USB controller card Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 018/121] USB: cdc-acm: Remove Motorola/Telit H24 serial interfaces from ACM driver Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 019/121] drm/radeon: memory leak on bo reservation failure. v2 Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 020/121] drm/radeon/si: make sure mc ucode is loaded before checking the size Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 021/121] mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages() Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 022/121] mm: use paravirt friendly ops for NUMA hinting ptes Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 023/121] iio: querying buffer scan_mask should return 0/1 Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 024/121] pata_at91: fix ata_host_activate() failure handling Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 025/121] ext4: note the error in ext4_end_bio() Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 026/121] ext4: fix jbd2 warning under heavy xattr load Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 027/121] ext4: use i_size_read in ext4_unaligned_aio() Kamal Mostafa
2014-06-17 16:13 ` [PATCH 3.8 028/121] locks: allow __break_lease to sleep even when break_time is 0 Kamal Mostafa
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=1403021714-16320-11-git-send-email-kamal@canonical.com \
--to=kamal@canonical.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®