1. 15 11月, 2016 5 次提交
  2. 17 10月, 2016 1 次提交
    • A
      mac80211: move struct aead_req off the stack · f4a067f9
      Ard Biesheuvel 提交于
      Some crypto implementations (such as the generic CCM wrapper in crypto/)
      use scatterlists to map fields of private data in their struct aead_req.
      This means these data structures cannot live in the vmalloc area, which
      means that they cannot live on the stack (with CONFIG_VMAP_STACK.)
      
      This currently occurs only with the generic software implementation, but
      the private data and usage is implementation specific, so move the whole
      data structures off the stack into heap by allocating every time we need
      to use them.
      
      In addition, take care not to put any of our own stack allocations into
      scatterlists. This involves reserving some extra room when allocating the
      aead_request structures, and referring to those allocations in the scatter-
      lists (while copying the data from the stack before the crypto operation)
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f4a067f9
  3. 12 10月, 2016 5 次提交
    • 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
  4. 30 9月, 2016 11 次提交
  5. 20 9月, 2016 1 次提交
    • H
      mac80211: Use rhltable instead of rhashtable · 83e7e4ce
      Herbert Xu 提交于
      mac80211 currently uses rhashtable with insecure_elasticity set
      to true.  The latter is because of duplicate objects.  What's
      more, mac80211 walks the rhashtable chains by hand which is broken
      as rhashtable may contain multiple tables due to resizing or
      rehashing.
      
      This patch fixes it by converting it to the newly added rhltable
      interface which is designed for use with duplicate objects.
      
      With rhltable a lookup returns a list of objects instead of a
      single one.  This is then fed into the existing for_each_sta_info
      macro.
      
      This patch also deletes the sta_addr_hash function since rhashtable
      defaults to jhash.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83e7e4ce
  6. 16 9月, 2016 1 次提交
    • E
      mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE · c68df2e7
      Emmanuel Grumbach 提交于
      In 46fa38e8 ("mac80211: allow software PS-Poll/U-APSD with
      AP_LINK_PS"), Johannes allowed to use mac80211's code for handling
      stations that go to PS or send PS-Poll / uAPSD trigger frames for
      devices that enable RSS.
      
      This means that mac80211 doesn't look at frames anymore but rather
      relies on a notification that will come from the device when a PS
      transition occurs or when a PS-Poll / trigger frame is detected by
      the device.
      
      iwlwifi will need this capability but still needs mac80211 to take
      care of the TIM IE. Today, if a driver sets AP_LINK_PS, mac80211
      will not update the TIM IE. Change mac80211 to check existence of
      the set_tim driver callback rather than using AP_LINK_PS to decide
      if the driver handles the TIM IE internally or not.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      [reword commit message a bit]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c68df2e7
  7. 15 9月, 2016 7 次提交
  8. 14 9月, 2016 1 次提交
  9. 13 9月, 2016 3 次提交
  10. 12 9月, 2016 5 次提交