]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net80211: proper ssid length check in setmlme_assoc_adhoc()
authorBjoern A. Zeeb <bz@FreeBSD.org>
Wed, 6 Oct 2021 18:41:37 +0000 (18:41 +0000)
committerMark Johnston <markj@FreeBSD.org>
Tue, 15 Mar 2022 17:45:27 +0000 (13:45 -0400)
commit6eb932a969139b9f42f0ad130bda36f0d709e2a9
tree12eeb82d3081fb97c45865556637ce81710b593f
parentcbfb77f1953bde3c4d23bf2278e2762053d80fe9
net80211: proper ssid length check in setmlme_assoc_adhoc()

A user supplied SSID length is used without proper checks in
setmlme_assoc_adhoc() which can lead to copies beyond the end
of the user supplied buffer.
The ssid is a fixed size array for the ioctl and the argument
to setmlme_assoc_adhoc().
In addition to an ssid_len check of 0 also error in case the
ssid_len is larger than the size of the ssid array to prevent
problems.

PR: 254737
Reported by: Tommaso (cutesmilee.research protonmail.com)

(cherry picked from commit 526370fb85db4b659cff4625eb2f379acaa4a1a8)
(cherry picked from commit 0525ece3554edce14fa68a7fb61078ae2110c44b)
(cherry picked from commit ab5678c6c0d0b28feafdb2fd397866d6088f37d8)

Approved by: so
Security: FreeBSD-SA-22:02.wifi
sys/net80211/ieee80211_ioctl.c