1. 23 12月, 2019 1 次提交
    • J
      iwlwifi: pcie: work around DMA hardware bug · c4a786b3
      Johannes Berg 提交于
      There's a hardware bug in the flow handler (DMA engine), if the
      address + len of some TB wraps around a 2^32 boundary, the carry
      bit is then carried over into the next TB.
      
      Work around this by copying the data to a new page when we find
      this situation, and then copy it in a way that we cannot hit the
      very end of the page.
      
      To be able to free the new page again later we need to chain it
      to the TSO page, use the last pointer there to make sure we can
      never use the page fully for DMA, and thus cannot cause the same
      overflow situation on this page.
      
      This leaves a few potential places (where we didn't observe the
      problem) unaddressed:
       * The second TB could reach or cross the end of a page (and thus
         2^32) due to the way we allocate the dev_cmd for the header
       * For host commands, a similar thing could happen since they're
         just kmalloc().
      We'll address these in further commits.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      c4a786b3
  2. 20 12月, 2019 2 次提交
  3. 19 12月, 2019 3 次提交
    • W
      libertas: Fix two buffer overflows at parsing bss descriptor · e5e884b4
      Wen Huang 提交于
      add_ie_rates() copys rates without checking the length
      in bss descriptor from remote AP.when victim connects to
      remote attacker, this may trigger buffer overflow.
      lbs_ibss_join_existing() copys rates without checking the length
      in bss descriptor from remote IBSS node.when victim connects to
      remote attacker, this may trigger buffer overflow.
      Fix them by putting the length check before performing copy.
      
      This fix addresses CVE-2019-14896 and CVE-2019-14897.
      This also fix build warning of mixed declarations and code.
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NWen Huang <huangwenabc@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e5e884b4
    • D
      mt76: Off by one in mt76_calc_rx_airtime() · b43e36d7
      Dan Carpenter 提交于
      The sband->bitrates[] array has "sband->n_bitrates" elements so this
      check needs to be >= instead of > or we could read beyond the end of the
      array.
      
      These values come from when we call mt76_register_device():
      
      	ret = mt76_register_device(&dev->mt76, true, mt7603_rates,
      				   ARRAY_SIZE(mt7603_rates));
      
      Here sband->bitrates[] is mt7603_rates[] and ->n_bitrates is the
      ARRAY_SIZE()
      
      Fixes: 5ce09c1a ("mt76: track rx airtime for airtime fairness and survey")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b43e36d7
    • A
      mt76: fix LED link time failure · d68f4e43
      Arnd Bergmann 提交于
      The mt76_led_cleanup() function is called unconditionally, which
      leads to a link error when CONFIG_LEDS is a loadable module or
      disabled but mt76 is built-in:
      
      drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_unregister_device':
      mac80211.c:(.text+0x2ac): undefined reference to `led_classdev_unregister'
      
      Use the same trick that is guarding the registration, using an
      IS_ENABLED() check for the CONFIG_MT76_LEDS symbol that indicates
      whether LEDs can be used or not.
      
      Fixes: 36f7e2b2 ("mt76: do not use devm API for led classdev")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      d68f4e43
  4. 13 12月, 2019 1 次提交
    • T
      mac80211: Turn AQL into an NL80211_EXT_FEATURE · 911bde0f
      Toke Høiland-Jørgensen 提交于
      Instead of just having an airtime flag in debugfs, turn AQL into a proper
      NL80211_EXT_FEATURE, so drivers can turn it on when they are ready, and so
      we also expose the presence of the feature to userspace.
      
      This also has the effect of flipping the default, so drivers have to opt in
      to using AQL instead of getting it by default with TXQs. To keep
      functionality the same as pre-patch, we set this feature for ath10k (which
      is where it is needed the most).
      
      While we're at it, split out the debugfs interface so AQL gets its own
      per-station debugfs file instead of using the 'airtime' file.
      
      [Johannes:]
      This effectively disables AQL for iwlwifi, where it fixes a number of
      issues:
       * TSO in iwlwifi is causing underflows and associated warnings in AQL
       * HE (802.11ax) rates aren't reported properly so at HE rates, AQL could
         never have a valid estimate (it'd use 6 Mbps instead of up to 2400!)
      Signed-off-by: NToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/r/20191212111437.224294-1-toke@redhat.com
      Fixes: 3ace10f5 ("mac80211: Implement Airtime-based Queue Limit (AQL)")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      911bde0f
  5. 10 12月, 2019 2 次提交
  6. 02 12月, 2019 2 次提交
  7. 28 11月, 2019 3 次提交
  8. 22 11月, 2019 3 次提交
  9. 20 11月, 2019 23 次提交