From nobody Fri Jun 07 21:14:08 2024 X-Original-To: dev-commits-src-main@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 4Vwv8J6j9yz5MHyk; Fri, 07 Jun 2024 21:14:08 +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 4Vwv8J5qxhz4F75; Fri, 7 Jun 2024 21:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717794848; 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=k6XSLAmLT7I+6JThHIGe9YF2G7NGxiadkwRjsqoEEJM=; b=fjrCfrnftFKf1zrU0/LCP38mzKX7Lqr1SvuOyJ8p5I/3tKD/Yics60Gb1R9stKypO6Xq13 XS9A2EKF6O5ehOPFfXoX3ubCuXy7Xi11By5bpsYNhzT0bazjDWAsBteOYFJ02lqYJqCVIb lm6qhDfLi5knGjenNRWQmP13sEiTNkVJ6ZtLbLef+7BHJXPzchtzEXQICx+Q9AS6w7Yr6u K+MC4jOITAmzUmrHjGMkvBw9bld/Ig6Ebt2GGK70INhbIi4lfNZV2ezcqQAyGkbdm+QfkW T4ABcdtjOZpvnnwJft0IN9bHkz5AswfG30a0Ik2ZWv+Zo9dvN9zpamAHx2Hh+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717794848; a=rsa-sha256; cv=none; b=VXhh98Ly35HzPlQBQxqJPPmZnMyRaJY65rvHgOQLm+asap3KXaxYo9yWE/eHgnGG0bGqNE X08BY3aIRsAaA3CJ3qQ16KTtHKWqYqkODVzgz747AgSoddTTbFPHs9xspfDnLApXV1OSjp xQJUUT0rSxlq7DxmtBXcRK9yEUy8bdDLvy7js39Xn1Ar7WqGnPLm3Y9BarHEy5NDbvH6G8 1B+GTlLSP16zdFiviy7c/2QimUuQun4dRU32EV/TSFfEV/EtpMsqBLiE5/9Ti1HrdAXUXP P0MulXpyaCjZ6GpWB9286EYj01GQKScxvSNvN4wPPxjvK9RRUZcg8mC/W9H7nw== 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=1717794848; 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=k6XSLAmLT7I+6JThHIGe9YF2G7NGxiadkwRjsqoEEJM=; b=pwbSV3v6J0ycGdi8nSY5z7fSdPpu9AYOJ5daQ4fpacfGr6ijKL03dsTYyRcWfh9v9IC6d1 b02c1hFTMnSwGn2EFbue8QlVDsQp8NOHuTydzBOlHcQGmR1YHXsOy1kASYXyRDWwHmeL5q MhEMGgZ/JIgOOZTF3W5x8zhkoCeiGTOlCg3Uu0vMVNs5QDHLvXoaHwsqVXpYfZwgieY2+I oQkdhkEEqcGbirqjTdHKe3UpzZZrrpEWYs45UiZol0P1U+0CHAn7OSKTTRpkFWHW2zlG2D sSmr11ePybKQP0vaVPxyprBq2lwWwAQ1yT8Cl/wZSSbXyV930gNg7iAfCvmhYQ== 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 4Vwv8J5RHHzWFG; Fri, 7 Jun 2024 21:14:08 +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 457LE8aq031162; Fri, 7 Jun 2024 21:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 457LE8M8031159; Fri, 7 Jun 2024 21:14:08 GMT (envelope-from git) Date: Fri, 7 Jun 2024 21:14:08 GMT Message-Id: <202406072114.457LE8M8031159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 582469016aed - main - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 582469016aed4fac3a7ead24dc31000edbb7e823 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=582469016aed4fac3a7ead24dc31000edbb7e823 commit 582469016aed4fac3a7ead24dc31000edbb7e823 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb 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);