]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: mac80211: Add sta pointer sanity check in ieee80211_8023_xmit()
authorTamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
Thu, 4 Jun 2026 16:24:01 +0000 (21:54 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 5 Jun 2026 14:09:04 +0000 (16:09 +0200)
commit303f11fda2fa4c6f7aa86b8fa54aaee5e1ef181b
tree5a9c0434215e4584880cbcb79a566f311a3dbfbe
parentdfb67ae569bf0726187725b1ef8d89377778861e
wifi: mac80211: Add sta pointer sanity check in ieee80211_8023_xmit()

Currently ieee80211_8023_xmit() accesses the sta pointer without any
sanity check, assuming that only unicast packets for an authorized
station are processed. But the sta pointer could become NULL when
a framework to support 802.3 offload for the multicast packets is
added in the follow-up patches. Add the valid sta pointer sanity
check to avoid the invalid pointer access.

This aligns with some of the subordinate functions called by
ieee80211_8023_xmit() that already NULL-check 'sta' such as
ieee80211_select_queue() and ieee80211_aggr_check().

Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com>
Link: https://patch.msgid.link/20260604162403.1563729-2-tamizh.raja@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c