From nobody Wed Jun 12 16:41:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsM0kfRz5N37T; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsL3Zbpz4gg7; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=hXc1IG76sjvT+GxuV4gIsHJ7a9fZZbu/iaWu2IjdV4sDpYa+oMqE+WfareQAAW/FFZjqof 42xUYDdi9A35A0zNEYcucZmemJhyTMxTCSxqeZ8QxEHLVjRhad80l7wmXuRxyXWWV5tY81 zJTN7oHrHqmPD7EukT+ONdlzSyASPXDflSBXwPbreFUQqtJgPfsisgwmbCSOWxiUdAJZfi 4qUnbpJ911jyIP7JNkNVCOO9JEQeUXY9T8vmSMtUG2M3FjjFzh6mpVQIHdzPyxhmhpUqYI PgqQoF8ywo7SIsNamADkjcWGVoDDK8ZVjUbNHqEQsBv71qT399cGReROAMxPfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210486; a=rsa-sha256; cv=none; b=cKPc0C+xKfY1Tqkmm/1rjtwJCY1dno1ZrEm7ymePuUJH5wE8+KBd/q7pBGEmExTvAFKxFc yI2Diz0vKErvK6Qj9/0XxpUUkgkfI8VRadpuNhlMutrPeejpbTXV7soQZzWjGoq4+AZ0r2 ZEshleGTsayibhW5sD9QmVLSbkXswc8gIkErTSY2QwmzF6eHWrxuacGH1gaF/m9GMlt1Xs w5UIkPOCAbXaCsm5fBbp39FziYmKqI3GZaJfwZazq117uFi+g+h2spcCRqW/PGgw+VcvA6 sThA1V5gjypM0ozSVcnTZONeLyT0tkt2cuX5u7sBSFWleyfVjjuS5F2zSH8AWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=I35oYt7QWnibY3mCkd7TkPdJTindpEpiI68huTjdy7ddGR2bF4QGJsa9HlbwuLX2QXSXeD QN6Ab/XKINyLaqjVTWqmyjaBP65tCmfQMjbe5Y7cbkPmRxgvb24004v3ggtlMM8K6wQShj jQLDHvynwAzG4PmJYnOKUCbsBVYAqa38C7p1gCVB6PksYVke5/kKV97hrm0MjuxtsQRb/H y8yTqwocZO6rKT5QSRPgJwJY5MaO1ESIFz3GMlQG/6CVcgsOdnr+0Z16fOlsZcLa800Vqh OI9JjC3HiiuX3ol7aQaOlQQINg7QX7jMqRX6B6NHjrCHs910BiZcIaEWNZuITQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsL3BxCz10Fm; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfQ94046849; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfQBU046846; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:26 GMT Message-Id: <202406121641.45CGfQBU046846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 29f9003cbbb3 - stable/14 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 29f9003cbbb3874fdbb02b99069868d00bcdff5a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=29f9003cbbb3874fdbb02b99069868d00bcdff5a commit 29f9003cbbb3874fdbb02b99069868d00bcdff5a Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb 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);