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 DD8741991D0 for ; Tue, 16 Jul 2024 11:14:07 +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=1721128448; cv=none; b=LrGey4IbmqaS4apO9LhZdWEmwqU98QcLK6BnymtbKW2VhwRUYShQAjYVnLe40iLqTGa7MQKkwFxh0v7fHoVvwlhdXCxlIFtvBnqGgQMsCwEUj0f/UYMtDrEKI5Pl1hOa9L/n2bjNQ+7q22csFSvIqH8kqU7VcKGsSmkrmLaMZzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721128448; c=relaxed/simple; bh=s+MLagqfHW0lrkHyfwsvAeFK1YLsuaui/k3i8FIezqc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kCmqL53j0a7a1tCZVte83y4b+3ehrPXQxTzKjE7xKi3V8xZHO7dIGkbXZrIccGxnzSRLBvRYNWXHFsxRQuqnznGOex23zyinEnSHU8gWb3oBMJhmlnlVWLVB8VQicAtzo1DM6dKqrlNTBL3ZjF/wfAsySwzTAi3MX0z13lDFXSQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0AW6yeQc; 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="0AW6yeQc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06AECC4AF0C; Tue, 16 Jul 2024 11:14:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721128447; bh=s+MLagqfHW0lrkHyfwsvAeFK1YLsuaui/k3i8FIezqc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0AW6yeQcf9tfQqK/nFn6ZY54QqcBCC/fC6O8P3RuDjU7xsAKrvGLBKmbMcio+XCi8 ZzINn6uNzkL+dRTJ3hzwe+cbXugOgPvLG2uMJ579C0OaGiqc3qZn3OpGa4l5LSxE1o /0ND+kq9c4I7sIHPSUT2ZskzS6dOyvPowDn7Lr94= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48779: net: mscc: ocelot: fix use-after-free in ocelot_vlan_del() Date: Tue, 16 Jul 2024 13:13:33 +0200 Message-ID: <2024071632-CVE-2022-48779-94bd@gregkh> X-Mailer: git-send-email 2.45.2 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=1959; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=s+MLagqfHW0lrkHyfwsvAeFK1YLsuaui/k3i8FIezqc=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnTQu/8ELv7Lomz+ibbmvbP5xz3VFx+prJ94/Lgu4vZL /rNDb3Z2RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATuXKUYa70PCFTgZ7gB28S XNgSHOZb607zL2WYX3JjRvWHWdnbLvVsjBaeXnqJ18k+CQA= 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: mscc: ocelot: fix use-after-free in ocelot_vlan_del() ocelot_vlan_member_del() will free the struct ocelot_bridge_vlan, so if this is the same as the port's pvid_vlan which we access afterwards, what we're accessing is freed memory. Fix the bug by determining whether to clear ocelot_port->pvid_vlan prior to calling ocelot_vlan_member_del(). The Linux kernel CVE team has assigned CVE-2022-48779 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit d4004422f6f9 and fixed in 5.16.11 with commit c98bed60cdd7 Issue introduced in 5.16 with commit d4004422f6f9 and fixed in 5.17 with commit ef5764057540 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-48779 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: drivers/net/ethernet/mscc/ocelot.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/c98bed60cdd7f22237ae256cc9c1c3087206b8a2 https://git.kernel.org/stable/c/ef57640575406f57f5b3393cf57f457b0ace837e