diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2024-06-05 22:35:00 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2024-06-12 13:59:11 +0000 |
| commit | 29f9003cbbb3874fdbb02b99069868d00bcdff5a (patch) | |
| tree | b9ea39849ef282871f5b5ee533893624c04289c1 | |
| parent | 49f29c4183d93afd2724509362daaf41b16eca5d (diff) | |
LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx()
The logic following this new assignment in some cases may not set lsta
but the later tracing is checking for it to be != NULL.
With lsta not initialized that check may not hold up and later we would
dereference lsta->state and possibly panic.
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45507
(cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823)
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ecacb74f01f3..6c96f1541488 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5055,6 +5055,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); |
