mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-27 16:50:30 +04:00
mac80211_hwsim uploads CCMP and GCMP keys with
IEEE80211_KEY_FLAG_RESERVE_TAILROOM and encrypts each frame in software
from mac80211_hwsim_tx(). __ieee80211_xmit_fast() resizes the frame
without encryption tailroom, so a frame whose tailroom is shorter than
the MIC hits the check in ccmp_encrypt_skb() or gcmp_encrypt_skb() and
is dropped:
WARNING: net/mac80211/wpa.c:462 at ccmp_encrypt_skb.isra.0+0x298/0x2b0
ieee80211_crypto_ccmp_encrypt+0x3b/0x60
ieee80211_encrypt_tx_skb+0x9e/0x130
mac80211_hwsim_tx+0x7b8/0xb40
...
__ieee80211_xmit_fast+0x237/0x3c0
ieee80211_xmit_fast+0x181/0x1c0
A locally sent IPv6 UDP datagram keeps only the slack of its allocation
as tailroom, so mDNS over an MLD backhaul station loses datagrams this
way.
Backport commit 94ae426f03b7 ("wifi: mac80211: handle missing tailroom
in SW crypto") from wireless-next: software crypto expands a short tail
instead of dropping the frame. Refresh the context of its ieee80211_i.h
hunk for 7.2, where IEEE80211_ENCRYPT_TAILROOM is 18, and the line
numbers of the later patches that change ieee80211_i.h.
Signed-off-by: Felix Fietkau <nbd@nbd.name>