]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mac80211: twt: don't use potentially unaligned pointer
authorJohannes Berg <johannes.berg@intel.com>
Mon, 27 Sep 2021 09:51:24 +0000 (11:51 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:20 +0000 (09:48 +0100)
commitddc14ed0463639d2f33810f47bc1d54ad1fed31e
tree95dcca4f518eeb4689af4ea512c5b407602630b5
parent067cb578f21de5fd68dd80afad372e54efb2544c
mac80211: twt: don't use potentially unaligned pointer

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 7ff379ba2d4b7b205240e666601fe302207d73f8 ]

Since we're pointing into a frame, the pointer to the
twt_agrt->req_type struct member is potentially not
aligned properly. Open-code le16p_replace_bits() to
avoid passing an unaligned pointer.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: f5a4c24e689f ("mac80211: introduce individual TWT support in AP mode")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20210927115124.e1208694f37b.Ie3de9bcc5dde5a79e3ac81f3185beafe4d214e57@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/mac80211/s1g.c