Page MenuHomeFreeBSD

net80211: correct length check in ieee80211_ies_expand()
ClosedPublic

Authored by bz on Oct 6 2021, 6:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 27, 8:23 AM
Unknown Object (File)
Feb 10 2026, 9:59 PM
Unknown Object (File)
Feb 8 2026, 5:37 AM
Unknown Object (File)
Feb 7 2026, 11:08 PM
Unknown Object (File)
Jan 31 2026, 8:27 AM
Unknown Object (File)
Jan 10 2026, 3:56 PM
Unknown Object (File)
Dec 25 2025, 7:30 PM
Unknown Object (File)
Dec 11 2025, 2:36 PM

Details

Summary

In ieee80211_ies_expand() we are looping over Elements
(also known as Information Elements or IEs).
The comment suggests that we assume well-formedness of
the IEs themselves.
Checking the buffer length being least 2 (1 byte Element ID and
1 byte Length fields) rather than just 1 before accessing ie[1]
is still good practise and can prevent and out-of-bounds read in
case the input is not behaving according to the comment.

Reported by: (coypu sdf.org)
admbugs: 857
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable