wifi: mac80211: clear frame buffer to never leak stack
authorJohannes Berg <johannes.berg@intel.com>
Tue, 1 Jul 2025 07:22:13 +0000 (09:22 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 7 Jul 2025 08:42:36 +0000 (10:42 +0200)
commit8af596e8ae44c3bcf36d1aea09fc9a6f17c555e5
treef1be66283f7b729eae2d95c16be45d5c836acd83
parentc5fd399a24c8e2865524361f7dc4d4a6899be4f4
wifi: mac80211: clear frame buffer to never leak stack

In disconnect paths paths, local frame buffers are used
to build deauthentication frames to send them over the
air and as notifications to userspace. Some internal
error paths (that, given no other bugs, cannot happen)
don't always initialize the buffers before sending them
to userspace, so in the presence of other bugs they can
leak stack content. Initialize the buffers to avoid the
possibility of this happening.

Suggested-by: Zhongqiu Han <quic_zhonhan@quicinc.com>
Link: https://patch.msgid.link/20250701072213.13004-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c