wifi: cfg80211: fix receiving mesh packets without RFC1042 header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Felix Fietkau <nbd@xxxxxxxx>

commit fec3ebb5ed299ac3a998f011c380f2ded47f4866 upstream.

Fix ethernet header length field after stripping the mesh header

Cc: stable@xxxxxxxxxxxxxxx
Link: https://lore.kernel.org/all/CT5GNZSK28AI.2K6M69OXM9RW5@syracuse/
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
Reported-and-tested-by: Nicolas Escande <nico.escande@xxxxxxxxx>
Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
Link: https://lore.kernel.org/r/20230711115052.68430-1-nbd@xxxxxxxx
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/wireless/util.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct
 		hdrlen += ETH_ALEN + 2;
 	else if (!pskb_may_pull(skb, hdrlen))
 		return -EINVAL;
+	else
+		payload.eth.h_proto = htons(skb->len - hdrlen);
 
 	mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN;
 	switch (payload.flags & MESH_FLAGS_AE) {


Patches currently in stable-queue which might be from nbd@xxxxxxxx are

queue-6.1/wifi-cfg80211-fix-receiving-mesh-packets-without-rfc1042-header.patch
queue-6.1/wifi-mac80211-fix-potential-null-pointer-dereference.patch
queue-6.1/udp-fix-receiving-fraglist-gso-packets.patch
queue-6.1/wifi-mac80211-fix-mesh-path-discovery-based-on-unicast-packets.patch
queue-6.1/wifi-mac80211-fix-mesh-forwarding.patch
queue-6.1/wifi-mac80211-fix-receiving-a-msdu-frames-on-mesh-in.patch
queue-6.1/wifi-mac80211-fix-flow-dissection-for-forwarded-packets.patch
queue-6.1/wifi-mac80211-drop-bogus-static-keywords-in-a-msdu-rx.patch
queue-6.1/wifi-cfg80211-factor-out-bridge-tunnel-rfc1042-heade.patch
queue-6.1/wifi-mac80211-fix-receiving-mesh-packets-in-forwarding-0-networks.patch
queue-6.1/wifi-mac80211-fix-and-simplify-unencrypted-drop-chec.patch
queue-6.1/wifi-mac80211-remove-mesh-forwarding-congestion-chec.patch
queue-6.1/wifi-cfg80211-move-a-msdu-check-in-ieee80211_data_to.patch
queue-6.1/wifi-mac80211-add-a-workaround-for-receiving-non-sta.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux