HomeFreeBSD

net80211: proper ssid length check in setmlme_assoc_adhoc()

Description

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

Details

Provenance
bzAuthored on Oct 6 2021, 6:41 PM
Reviewer
emaste
Differential Revision
D32341: net80211: proper ssid length check in setmlme_assoc_adhoc()
Parents
rGbd19202c92e3: sctp: improve KASSERT messages
Branches
Unknown
Tags
Unknown