]> 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)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Fri, 8 Oct 2021 10:23:31 +0000 (10:23 +0000)
commit526370fb85db4b659cff4625eb2f379acaa4a1a8
tree0e751f72737d1d2889c713552b4aada84cd0d389
parentbd19202c92e3d73e90aedd518f0963797744e50f
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)
MFC after: 3 days
Reviewed by: emaste, adrian
Differential Revision: https://reviews.freebsd.org/D32341
sys/net80211/ieee80211_ioctl.c