]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: cfg80211: fix two more possible UBSAN-detected off-by-one errors
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 9 Sep 2024 09:08:06 +0000 (12:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:28:57 +0000 (16:28 +0200)
commitcacdc118984118dac9593eb6a7bec2654f8b903a
tree4b53b426d06bf4d3977ebff60862a678c3eaaaba
parent2780657f7f5383f62e5e02a9ae6806dcdd26e47f
wifi: cfg80211: fix two more possible UBSAN-detected off-by-one errors

[ Upstream commit 15ea13b1b1fbf6364d4cd568e65e4c8479632999 ]

Although not reproduced in practice, these two cases may be
considered by UBSAN as off-by-one errors. So fix them in the
same way as in commit a26a5107bc52 ("wifi: cfg80211: fix UBSAN
noise in cfg80211_wext_siwscan()").

Fixes: 807f8a8c3004 ("cfg80211/nl80211: add support for scheduled scans")
Fixes: 5ba63533bbf6 ("cfg80211: fix alignment problem in scan request")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20240909090806.1091956-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/nl80211.c
net/wireless/sme.c