1. 18 12月, 2018 3 次提交
  2. 11 10月, 2018 3 次提交
    • J
      mac80211: Extend SAE authentication in infra BSS STA mode · efb543e6
      Jouni Malinen 提交于
      Previous implementation of SAE authentication in infrastructure BSS was
      somewhat restricting and not exactly clean way of handling the two
      auth() operations. This ended up removing and re-adding the STA entry
      for the AP in the middle of authentication and also messing up
      authentication state tracking through the sequence of four
      Authentication frames. Furthermore, this did not work if the AP ended up
      sending out SAE Confirm (auth trans #2) immediately after SAE Commit
      (auth trans #1) before the station had time to transmit its SAE Confirm.
      
      Clean up authentication state handling for the SAE case to allow two
      rounds of auth() calls without dropping all state between those
      operations. Track peer Confirmed status and mark authentication
      completed only once both ends have confirmed.
      
      ieee80211_mgd_auth() check for EBUSY cases is now handling only the
      pending association (ifmgd->assoc_data) while all pending authentication
      (ifmgd->auth_data) cases are allowed to proceed to allow user space to
      start a new connection attempt from scratch even if the previously
      requested authentication is still waiting completion. This is needed to
      avoid making SAE error cases with retries take excessive amount of time
      with no means for the user space to stop that (apart from setting the
      netdev down).
      
      As an extra bonus, the end of ieee80211_rx_mgmt_auth() can be cleaned up
      to avoid the extra copy of the cfg80211_rx_mlme_mgmt() call for ongoing
      SAE authentication since the new ieee80211_mark_sta_auth() helper
      function can handle both completion of authentication and updates to the
      STA entry under the same condition and there is no need to return from
      the function between those operations.
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      efb543e6
    • J
      mac80211: Move ieee80211_mgd_auth() EBUSY check to be before allocation · 8d7432a2
      Jouni Malinen 提交于
      This makes it easier to conditionally replace full allocation of
      auth_data to use reallocation for the case of continuing SAE
      authentication. Furthermore, there was not really any point in having
      this check done so late in the function after having already completed
      number of steps that cannot be used anyway in the error case.
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8d7432a2
    • J
      mac80211: Helper function for marking STA authenticated · fc107a93
      Jouni Malinen 提交于
      Authentication exchange can be completed in both TX and RX paths for
      SAE, so move this common functionality into a helper function to avoid
      having to implement practically the same operations in two places when
      extending SAE implementation in the following commits.
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fc107a93
  3. 05 9月, 2018 2 次提交
  4. 03 9月, 2018 2 次提交
  5. 29 6月, 2018 2 次提交
    • J
      mac80211: remove unnecessary NULL check · f0c0407d
      Johannes Berg 提交于
      We don't need to check if he_oper is NULL before calling
      ieee80211_verify_sta_he_mcs_support() as it - now - will
      correctly check this itself. Remove the redundant check.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f0c0407d
    • G
      mac80211: fix potential null pointer dereference · 47aa7861
      Gustavo A. R. Silva 提交于
      he_op is being dereferenced before it is null checked, hence there
      is a potential null pointer dereference.
      
      Fix this by moving the pointer dereference after he_op has been
      properly null checked.
      
      Notice that, currently, he_op is already being null checked before
      calling this function at 4593:
      
      4593	if (!he_oper ||
      4594	    !ieee80211_verify_sta_he_mcs_support(sband, he_oper))
      4595		ifmgd->flags |= IEEE80211_STA_DISABLE_HE;
      
      but in case ieee80211_verify_sta_he_mcs_support is ever called
      without verifying he_oper is not null, we will end up having a
      null pointer dereference. So, we better don't take any chances.
      
      Addresses-Coverity-ID: 1470068 ("Dereference before null check")
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      47aa7861
  6. 19 6月, 2018 1 次提交
  7. 15 6月, 2018 2 次提交
  8. 23 5月, 2018 1 次提交
  9. 07 5月, 2018 1 次提交
  10. 19 4月, 2018 1 次提交
  11. 29 3月, 2018 4 次提交
  12. 21 3月, 2018 2 次提交
  13. 23 2月, 2018 2 次提交
  14. 11 12月, 2017 2 次提交
  15. 27 11月, 2017 1 次提交
  16. 20 11月, 2017 1 次提交
  17. 13 10月, 2017 1 次提交
    • J
      mac80211: don't track HT capability changes · b1b1ae2c
      Johannes Berg 提交于
      The code here (more or less accidentally) tracks the HT capability of
      the AP when connected, and we found at least one AP that erroneously
      toggles its 20/40 capability bit when changing between 20/40 MHz. The
      connection to the AP is then broken because we set the 40 MHz disable
      flag based on this, as soon as it switches to 20 MHz, but because the
      flag then changed, we disconnect.
      
      I'd be inclined to just ignore this issue, since we then reconnect
      while the AP is in 20 MHz mode and never use 40 MHz with it again,
      but this code is a bit strange anyway - we don't use the capabilities
      for anything else.
      
      Change the code to simply not track the HT capabilities at all, which
      assumes that the AP at least sets 20/40 capability when operating in
      40 MHz (or higher). If not, rate scaling might end up using only the
      narrower bandwidth.
      
      The new behaviour also mirrors what VHT does, where we only check the
      VHT operation.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b1b1ae2c
  18. 21 9月, 2017 1 次提交
    • J
      mac80211: simplify and clarify IE splitting · a7f26d80
      Johannes Berg 提交于
      There's no need to split off IEs from the ones obtained
      from userspace, if they were already split off, so for
      example IEs that went before HT don't have to be listed
      again to go before VHT. Simplify the code here so it's
      clearer.
      
      While at it, also clarify the comments regarding the DMG
      (60 GHz) elements.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a7f26d80
  19. 05 9月, 2017 1 次提交
  20. 21 6月, 2017 1 次提交
  21. 16 6月, 2017 2 次提交
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
    • J
      networking: convert many more places to skb_put_zero() · b080db58
      Johannes Berg 提交于
      There were many places that my previous spatch didn't find,
      as pointed out by yuan linyu in various patches.
      
      The following spatch found many more and also removes the
      now unnecessary casts:
      
          @@
          identifier p, p2;
          expression len;
          expression skb;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_zero(skb, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_zero(skb, len);
          )
          ... when != p
          (
          p2 = (t2)p;
          -memset(p2, 0, len);
          |
          -memset(p, 0, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_zero(skb, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_zero(skb, sizeof(t));
          )
          ... when != p
          (
          p2 = (t2)p;
          -memset(p2, 0, sizeof(*p));
          |
          -memset(p, 0, sizeof(*p));
          )
      
          @@
          expression skb, len;
          @@
          -memset(skb_put(skb, len), 0, len);
          +skb_put_zero(skb, len);
      
      Apply it to the tree (with one manual fixup to keep the
      comment in vxlan.c, which spatch removed.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b080db58
  22. 13 6月, 2017 2 次提交
  23. 19 5月, 2017 1 次提交
  24. 08 5月, 2017 1 次提交