Date: Fri, 7 Jun 2024 21:14:08 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 582469016aed - main - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() Message-ID: <202406072114.457LE8M8031159@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=582469016aed4fac3a7ead24dc31000edbb7e823 commit 582469016aed4fac3a7ead24dc31000edbb7e823 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-07 21:06:31 +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 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 --- 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 03b36e6526bd..cd1897a08ccd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5054,6 +5054,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406072114.457LE8M8031159>