[PATCH ath-next v2 0/6] wifi: ath11k, ath12k: RX correctness fixes

Julius Bairaktaris julius at bairaktaris.de
Sat Nov 28 09:22:14 PST 2026


Six RX fixes for ath11k and ath12k. "The hardware" below is an
IPQ8074 hw2.0 with firmware WLAN.HK.2.12-01460.

1/6, 2/6: checksum trusted for frames the hardware did not check
- Trigger: an associated peer sends ICMP or ICMPv6 with a wrong
  checksum, a UDP datagram with a wrong checksum in IP fragments, or a
  TCP or UDP packet with a wrong checksum in 802.11 fragments (a station
  sets its fragmentation threshold below the packet size).
- By the code, every ath11k and ath12k chip and frame mode.
- Shown on the hardware with OpenWrt's ath11k, 50 frames per case,
  1 run each: with ath-next's rule the AP answered 50 of 50 ICMP echo
  requests with a wrong checksum and 50 of 50 fragmented UDP datagrams
  with a wrong checksum; with this series it answered none of either
  and counted 50 checksum errors each.
- Impact: the stack accepts such frames unchecked (icmp_rcv(), UDP
  after reassembly). CVSS 3.1: 3.5,
  AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N.
- Workaround: none; mac80211 offers no switch for RX checksum offload.
- Found by an LLM review (Claude) of the code.

3/6: ath11k delivers frames under a forged source address
- Trigger: a station associated to an ath11k AP turns on 4-address
  mode on its own side and sends data frames with any source address.
- Reachable with frame_mode=2 (Ethernet decap) only. On the hardware,
  an ath10k station sent 200 broadcasts with a forged source: all 200
  reached the AP's bridge, which learned the forged address on the
  Wi-Fi port. One run.
- Impact: a station can send frames as another host, and the bridge
  then sends that host's traffic to the Wi-Fi port, where it is lost.
  CVSS 3.1: 4.6, AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L.
- Workaround: the default frame_mode=1 (native Wi-Fi).
- Found by an LLM review (Claude) of the code, then reproduced as
  above.

4/6, 5/6: replay check of the group key skipped
- Trigger: a radio in range replays a recorded group-addressed data
  frame while the receiver gets unicast data; no key needed.
- Both drivers keep one receive status for all MSDUs of a REO reap and
  do not clear RX_FLAG_PN_VALIDATED between them, so a group-addressed
  MSDU behind a decrypted unicast one skips mac80211's replay check.
  Not reachable on the hardware: its firmware releases group-addressed
  MSDUs through the REO error path, which gives each MSDU its own
  status. An ath11k station under unicast load received 29011
  group-addressed MSDUs there, and none carried RX_FLAG_PN_VALIDATED
  in from an earlier MSDU. It would be reachable on a chip or firmware
  that delivers group-addressed MSDUs through the REO destination ring;
  none is known.
- Impact there: replayed group-addressed frames would be accepted.
  CVSS 3.1 if reachable: 3.1, AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
- Workaround: none needed on the hardware; elsewhere none.
- Found by an LLM review (Claude) of the code; measured as above.

6/6: ath12k loses EAPOL and group frames
- Trigger: an EAPOL frame, or a decrypted group-addressed frame,
  arrives in the same REO reap after a data frame of any station.
- Since commit c4aa897fe234 ("wifi: ath12k: Handle DP_RX_DECAP_TYPE_8023
  type in Rx path") ath12k sets RX_FLAG_8023 in the shared receive
  status and never clears it, so such a frame goes down mac80211's 802.3
  path with an 802.11 header and is lost. ath12k uses Ethernet decap
  without any setting when the firmware advertises
  WMI_TLV_SERVICE_ETH_OFFLOAD.
- Impact: 4-way handshakes and group rekeys stall until retried, and
  decrypted broadcasts such as ARP, ND and DHCP are lost. CVSS 3.1:
  2.6, AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L.
- Workaround: none.
- Found by an LLM review (Claude) of the code.

I used Claude (Anthropic) to help write these patches.

Changes in v2:
- 1/6: also leave a frame reassembled from 802.11 fragments and a raw
  A-MSDU to the stack (Sashiko, on v1 1/6).
- 2/6: also leave a frame reassembled from 802.11 fragments to the
  stack (the same finding); read the new flags from the last buffer of
  the MSDU, as ath-next now does for the other MSDU end fields since
  commit 1e678e37ff13 ("wifi: ath12k: fix decap of MSDUs spanning
  multiple RX buffers").
- 3/6: result with the check run on this version.
- Rebased onto ath-next; discovery lines reworded.
- v1: https://lore.kernel.org/r/20261122210525.2076058-1-julius@bairaktaris.de

Julius Bairaktaris (6):
  wifi: ath11k: only trust the RX checksum of a frame the hardware
    checked
  wifi: ath12k: only trust the RX checksum of a frame the hardware
    checked
  wifi: ath11k: drop decapped frames with a source other than the
    station
  wifi: ath11k: clear the crypto flags of the receive status for each
    MSDU
  wifi: ath12k: clear the crypto flags of the receive status for each
    MSDU
  wifi: ath12k: clear RX_FLAG_8023 of the receive status for each MSDU

 drivers/net/wireless/ath/ath11k/dp_rx.c       | 124 ++++++++++++++++--
 drivers/net/wireless/ath/ath11k/hw.c          |  22 ++++
 drivers/net/wireless/ath/ath11k/hw.h          |   1 +
 drivers/net/wireless/ath/ath12k/hal.h         |   1 +
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c |  17 ++-
 .../wireless/ath/ath12k/wifi7/hal_qcc2072.c   |  11 ++
 .../wireless/ath/ath12k/wifi7/hal_qcn9274.c   |  12 ++
 .../wireless/ath/ath12k/wifi7/hal_wcn7850.c   |  12 ++
 8 files changed, 188 insertions(+), 12 deletions(-)


base-commit: 18d0bedbb5f0538396cb7f763ed9cd1dd69c5b23
-- 
2.53.0




More information about the ath12k mailing list