From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F08B5218EB8 for ; Wed, 26 Feb 2025 02:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536639; cv=none; b=ZRNVcIeHzXtknl1787i3vmk8fGJrCBB6G6LVO80WD5eZpnNFYF76EgBTqeXFwc47rw4b8IxSls5Ws9WxynKbUgBUSutaOnSzdS0fUmbgnnUPypw7ieit/SVM8JNU1mSgAedknEOU7jujy65wLEW1wf2Xh/r3fhYsprVEl5e1bJs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536639; c=relaxed/simple; bh=VKJhLhc4f9dTcnp7Z2Sq3ruP4YXTJCMVf8LTJf8dQXQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=c721q87NXAz0iJ1TRzTjx9Vw+gbaCHsyo52BvRuh2drbj42lDdFArrGe2wqVHSazBvC3/zDHJkUs92WASnySvWJu9KiuIjJkmHtL2fjlpLnjnxi/NyQYKDiDlZPCy+YQtUFrUyiJLsafaEOVIGouRSRmn66uvdu4gOQ7enpWj78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v1UAelIQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="v1UAelIQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D06CC4CEDD; Wed, 26 Feb 2025 02:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536638; bh=VKJhLhc4f9dTcnp7Z2Sq3ruP4YXTJCMVf8LTJf8dQXQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=v1UAelIQ3NC11XwCzET96piGt1bKv4UiZM113mmkmJvX2bH94u/5xG9IH5BwFAhBf LEDCXY2EdkNnmN714gNg3FMQWqyAVNfuMsK/pU/BpMMFb23/8nbl0MA+ohvr7qPz8Z C5PDqC6xccQOOL+w6vqhDqiDcnJN6DJ/DjUBllfs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49582: net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering Date: Wed, 26 Feb 2025 03:22:25 +0100 Message-ID: <2025022608-CVE-2022-49582-8f09@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2255; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VKJhLhc4f9dTcnp7Z2Sq3ruP4YXTJCMVf8LTJf8dQXQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qi6IXknctk5vg7x/57ucN5JLGGb435D7VvH3Xsj1b 0qtF59Vd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEgh0Z5ulWMnP+XC23ZvcE qWNX73xfx6PwrJFhfoQzo/7l71c+P3I8W8CwIVzQQGHCVwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering The "ds" iterator variable used in dsa_port_reset_vlan_filtering() -> dsa_switch_for_each_port() overwrites the "dp" received as argument, which is later used to call dsa_port_vlan_filtering() proper. As a result, switches which do enter that code path (the ones with vlan_filtering_is_global=true) will dereference an invalid dp in dsa_port_reset_vlan_filtering() after leaving a VLAN-aware bridge. Use a dedicated "other_dp" iterator variable to avoid this from happening. The Linux kernel CVE team has assigned CVE-2022-49582 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit d0004a020bb50263de0e3e775c7b7c7a003e0e0c and fixed in 5.18.15 with commit 3240e12fe203a3a79b9814e83327106b770ed7b0 Issue introduced in 5.16 with commit d0004a020bb50263de0e3e775c7b7c7a003e0e0c and fixed in 5.19 with commit 1699b4d502eda3c7ea4070debad3ee570b5091b1 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-49582 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/dsa/port.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/3240e12fe203a3a79b9814e83327106b770ed7b0 https://git.kernel.org/stable/c/1699b4d502eda3c7ea4070debad3ee570b5091b1