]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: fix key tailroom accounting leak
authorJohannes Berg <johannes.berg@intel.com>
Sun, 19 Oct 2025 08:54:27 +0000 (11:54 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 20 Oct 2025 11:57:10 +0000 (13:57 +0200)
commited6a47346ec69e7f1659e0a1a3558293f60d5dd7
treec9943936fb1214cb991d9aaba24fe2549d22d771
parent3776c685ebe5f43e9060af06872661de55e80b9a
wifi: mac80211: fix key tailroom accounting leak

For keys added by ieee80211_gtk_rekey_add(), we assume that
they're already present in the hardware and set the flag
KEY_FLAG_UPLOADED_TO_HARDWARE. However, setting this flag
needs to be paired with decrementing the tailroom needed,
which was missed.

Fixes: f52a0b408ed1 ("wifi: mac80211: mark keys as uploaded when added by the driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20251019115358.c88eafb4083e.I69e9d4d78a756a133668c55b5570cf15a4b0e6a4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/key.c