1. 15 12月, 2016 1 次提交
  2. 13 12月, 2016 2 次提交
  3. 09 12月, 2016 1 次提交
    • J
      cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts · e6f462df
      Johannes Berg 提交于
      When mac80211 abandons an association attempt, it may free
      all the data structures, but inform cfg80211 and userspace
      about it only by sending the deauth frame it received, in
      which case cfg80211 has no link to the BSS struct that was
      used and will not cfg80211_unhold_bss() it.
      
      Fix this by providing a way to inform cfg80211 of this with
      the BSS entry passed, so that it can clean up properly, and
      use this ability in the appropriate places in mac80211.
      
      This isn't ideal: some code is more or less duplicated and
      tracing is missing. However, it's a fairly small change and
      it's thus easier to backport - cleanups can come later.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e6f462df
  4. 15 11月, 2016 5 次提交
  5. 28 10月, 2016 1 次提交
    • A
      mac80211: fils_aead: fix encrypt error handling · 51487718
      Arnd Bergmann 提交于
      gcc -Wmaybe-uninitialized reports a bug in aes_siv_encryp:
      
      net/mac80211/fils_aead.c: In function ‘aes_siv_encrypt.constprop’:
      net/mac80211/fils_aead.c:84:26: error: ‘tfm2’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      At the time that the memory allocation fails, 'tfm2' has not been
      allocated, so we should not attempt to free it later, and we can
      simply return an error.
      
      Fixes: 39404fee ("mac80211: FILS AEAD protection for station mode association frames")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      51487718
  6. 27 10月, 2016 6 次提交
  7. 21 10月, 2016 1 次提交
    • J
      net: use core MTU range checking in wireless drivers · 9c22b4a3
      Jarod Wilson 提交于
      - set max_mtu in wil6210 driver
      - set max_mtu in atmel driver
      - set min/max_mtu in cisco airo driver, remove airo_change_mtu
      - set min/max_mtu in ipw2100/ipw2200 drivers, remove libipw_change_mtu
      - set min/max_mtu in p80211netdev, remove wlan_change_mtu
      - set min/max_mtu in net/mac80211/iface.c and remove ieee80211_change_mtu
      - set min/max_mtu in wimax/i2400m and remove i2400m_change_mtu
      - set min/max_mtu in intersil/hostap and remove prism2_change_mtu
      - set min/max_mtu in intersil/orinoco
      - set min/max_mtu in tty/n_gsm and remove gsm_change_mtu
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: Maya Erez <qca_merez@qca.qualcomm.com>
      CC: Simon Kelley <simon@thekelleys.org.uk>
      CC: Stanislav Yakovlev <stas.yakovlev@gmail.com>
      CC: Johannes Berg <johannes@sipsolutions.net>
      CC: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c22b4a3
  8. 19 10月, 2016 5 次提交
  9. 17 10月, 2016 3 次提交
  10. 13 10月, 2016 1 次提交
  11. 12 10月, 2016 9 次提交
    • J
      mac80211: preserve more bits when building QoS header · 32910bb9
      Johannes Berg 提交于
      Michael Braun reported that when trying to inject A-MSDUs over
      monitor interfaces, the frame doesn't come out right since the
      QoS header A-MSDU bit is overwritten.
      
      Rather than adding that bit specifically simply preserve those
      bits that we don't set here, since we typically get here with
      a zeroed-out QoS header anyway.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      32910bb9
    • M
      mac80211: filter multicast data packets on AP / AP_VLAN · 72f15d53
      Michael Braun 提交于
      This patch adds filtering for multicast data packets on AP_VLAN
      interfaces that have no authorized station connected and changes
      filtering on AP interfaces to not count stations assigned to
      AP_VLAN interfaces.
      
      This saves airtime and avoids waking up other stations currently
      authorized in this BSS. When using WPA, the packets dropped could
      not be decrypted by any station.
      
      The behaviour when there are no AP_VLAN interfaces is left unchanged.
      
      When there are AP_VLAN interfaces, this patch
      1. adds filtering multicast data packets sent on AP_VLAN interfaces
         that have no authorized station connected.
         No filtering happens on 4addr AP_VLAN interfaces.
      2. makes filtering of multicast data packets sent on AP interfaces
         depend on the number of authorized stations in this bss not
         assigned to an AP_VLAN interface.
      
      Therefore, a new num_mcast_sta counter is added for AP_VLAN interfaces.
      The existing one for AP interfaces is altered to not track stations
      assigned to an AP_VLAN interface.
      
      The new counter is exposed in debugfs.
      Signed-off-by: NMichael Braun <michael-dev@fami-braun.de>
      [reformat commit message a bit, unline ieee80211_vif_{inc,dec}_num_mcast]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      72f15d53
    • M
      mac80211: remove unnecessary num_mcast_sta check · 5f9994bd
      Michael Braun 提交于
      Checking for num_mcast_sta in __ieee80211_request_smps_ap() is
      unnecessary as sta list will be empty in this case anyway, so
      the list iteration will just exit immediately. Since this isn't
      a "hot" code path, it doesn't really matter, and the next patch
      will redefine num_mcast_sta to make this check invalid.
      Signed-off-by: NMichael Braun <michael-dev@fami-braun.de>
      [change commit message]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5f9994bd
    • J
      mac80211: remove unnecessary mesh check · 850092db
      Johannes Berg 提交于
      sta_info_get_bss() is equivalent to sta_info_get() in the
      mesh case, since sta->sdata->bss will be NULL (it's only
      set for AP/AP_VLAN interfaces.) Thus, the mesh check here
      isn't actually needed - remove it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      850092db
    • M
      mac80211: fix CMD_FRAME for AP_VLAN · 1d4de2e2
      Michael Braun 提交于
      When using IEEE 802.11r FT OVER-DS roaming with AP_VLAN, hostapd needs to
      send out a frame using CMD_FRAME for a station assigned to an AP_VLAN
      interface.
      
      Right now, the userspace needs to give the exact AP_VLAN interface index
      for CMD_FRAME; hostapd does not do this. Additionally, userspace cannot
      use GET_STATION to query the AP_VLAN ifidx, as while GET_STATION finds
      stations assigned to AP_VLAN even if the AP iface is queried, it does not
      return AP_VLAN ifidx (it returns the queried one).
      
      This breaks IEEE 802.11r over_ds with vlans, as the reply frame does not
      get out. This patch fixes this by using get_sta_bss for CMD_FRAME.
      Signed-off-by: NMichael Braun <michael-dev@fami-braun.de>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1d4de2e2
    • J
      mac80211: validate DA/SA during A-MSDU decapsulation · e2b5227f
      Johannes Berg 提交于
      As pointed out by Michael Braun, we don't check inner L2 addresses
      during A-MSDU decapsulation, leading to the possibility that, for
      example, a station associated to an AP sends frames as though they
      came from somewhere else.
      
      Fix this problem by letting cfg80211 validate the addresses, as
      indicated by passing in the ones that need to be validated.
      Reported-by: NMichael Braun <michael-dev@fami-braun.de>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e2b5227f
    • J
      cfg80211: add ability to check DA/SA in A-MSDU decapsulation · 8b935ee2
      Johannes Berg 提交于
      We should not accept arbitrary DA/SA inside A-MSDUs, it could be used
      to circumvent protections, like allowing a station to send frames and
      make them seem to come from somewhere else.
      
      Add the necessary infrastructure in cfg80211 to allow such checks, in
      further patches we'll start using them.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8b935ee2
    • J
      cfg80211: let ieee80211_amsdu_to_8023s() take only header-less SKB · 7f6990c8
      Johannes Berg 提交于
      There's only a single case where has_80211_header is passed as true,
      which is in mac80211. Given that there's only simple code that needs
      to be done before calling it, export that function from cfg80211
      instead and let mac80211 call it itself.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      7f6990c8
    • J
      mac80211: discard multicast and 4-addr A-MSDUs · ea720935
      Johannes Berg 提交于
      In mac80211, multicast A-MSDUs are accepted in many cases that
      they shouldn't be accepted in:
       * drop A-MSDUs with a multicast A1 (RA), as required by the
         spec in 9.11 (802.11-2012 version)
       * drop A-MSDUs with a 4-addr header, since the fourth address
         can't actually be useful for them; unless 4-address frame
         format is actually requested, even though the fourth address
         is still not useful in this case, but ignored
      
      Accepting the first case, in particular, is very problematic
      since it allows anyone else with possession of a GTK to send
      unicast frames encapsulated in a multicast A-MSDU, even when
      the AP has client isolation enabled.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ea720935
  12. 30 9月, 2016 5 次提交