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)
Sun, Dec 8, 6:33 PM
Unknown Object (File)
Sat, Nov 30, 5:09 PM
Unknown Object (File)
Oct 17 2024, 7:55 PM
Unknown Object (File)
Oct 2 2024, 8:51 AM
Unknown Object (File)
Sep 24 2024, 6:25 AM
Unknown Object (File)
Sep 24 2024, 1:23 AM
Unknown Object (File)
Sep 18 2024, 7:04 AM
Unknown Object (File)
Sep 14 2024, 6:59 AM

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