]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: fix unaligned le16 access
authorJohannes Berg <johannes.berg@intel.com>
Thu, 18 Apr 2024 08:52:26 +0000 (10:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:34 +0000 (16:32 +0200)
commit21221985378d224598c66fceac2645b8b6f3111c
tree7f1476ad739395ce1921e360ab17cdde7a2c247c
parent83a137e6a27398ca5ea3cb54f2fe948165ec7a13
wifi: mac80211: fix unaligned le16 access

[ Upstream commit c53d8a59351e4347452e263e2e5d7446ec93da83 ]

The AP removal timer field need not be aligned, so the
code shouldn't access it directly, but use unaligned
loads. Use get_unaligned_le16(), which even is shorter
than the current code since it doesn't need a cast.

Fixes: 8eb8dd2ffbbb ("wifi: mac80211: Support link removal using Reconfiguration ML element")
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240418105220.356788ba0045.I2b3cdb3644e205d5bb10322c345c0499171cf5d2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mlme.c