HomeFreeBSD

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

Description

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

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
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D37626

(cherry picked from commit 95d146592f5ee3fa998496713f28475e65996ff9)

Details

Provenance
jhbAuthored on Dec 21 2022, 6:45 PM
Reviewer
bz
Differential Revision
D37626: iee80211_hwmp: Don't dereference NULL ni in debug printf.
Parents
rG256b5d40e550: mrsas: Don't leak a stack pointer value in the softc.
Branches
Unknown
Tags
Unknown