Page MenuHomeFreeBSD

iee80211_hwmp: Don't dereference NULL ni in debug printf.
ClosedPublic

Authored by jhb on Dec 7 2022, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 18, 4:10 AM
Unknown Object (File)
Sun, Mar 15, 8:09 AM
Unknown Object (File)
Wed, Mar 11, 7:10 PM
Unknown Object (File)
Wed, Mar 11, 5:45 PM
Unknown Object (File)
Wed, Mar 11, 12:05 PM
Unknown Object (File)
Mon, Mar 9, 6:52 PM
Unknown Object (File)
Mon, Mar 9, 1:18 AM
Unknown Object (File)
Tue, Mar 3, 4:28 PM
Subscribers

Details

Summary

In this call to IEEE80211_NOTE, ni is always NULL due to the assignment
a few lines earlier at the start of the function. If debug traces are
enabled, then this will pass an invalid pointer as the 'mac' pointer to
ieee80211_note_mac. Use IEEE80211_DPRINTF which doesn't take a 'ni'
argument instead.

Reported by: GCC -Wstringop-overread

Diff Detail

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