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)
Fri, Dec 12, 1:41 AM
Unknown Object (File)
Tue, Dec 9, 5:20 PM
Unknown Object (File)
Sun, Nov 30, 7:05 PM
Unknown Object (File)
Nov 13 2025, 3:56 PM
Unknown Object (File)
Nov 10 2025, 12:34 AM
Unknown Object (File)
Nov 7 2025, 12:08 PM
Unknown Object (File)
Nov 3 2025, 4:42 AM
Unknown Object (File)
Nov 3 2025, 12:28 AM
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