git: 29f9003cbbb3 - stable/14 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Jun 2024 16:41:26 UTC
The branch stable/14 has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=29f9003cbbb3874fdbb02b99069868d00bcdff5a
commit 29f9003cbbb3874fdbb02b99069868d00bcdff5a
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-06-05 22:35:00 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-06-12 13:59:11 +0000
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)
---
sys/compat/linuxkpi/common/src/linux_80211.c | 1 +
1 file changed, 1 insertion(+)
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);