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 11BE913AD1D for ; Wed, 17 Apr 2024 10:17:46 +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=1713349066; cv=none; b=cMQFTuxo5hgiAiParaB+CDDvzGBYltkl8GRONXHzm41M6+YtB/6t9w9T2kGa4O2pQCzXZ1hYXlVoK3+PvvcvDXvFy/ra34WQzOibiUCRMKbNfna/WVOMt3CmYiLkieXqbcQaAUzE8YXCT4W+AXZ5uQu/K29VA+ifhhjh0x5vC8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349066; c=relaxed/simple; bh=WYg94CWKGt7ljPqG0plyThyxy7+wQ4vCpR7U11Kwsx4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oeJMDejVkHt2Rh2pi6IrqSSZyA9g7yofpXoZxN6NwELeD5ItI01il16d779Q9bHhasd2SgWme69TvRjwsiRzWQOT2Z98oqw2B86J3/GrACC5zAJUFSZiSQyMA/IrsG9WWOF+PZj9PLXRUmd7ysJPtslPawYr6en1vnKFnQtW6Qo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rZu0XvHq; 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="rZu0XvHq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 829A6C072AA; Wed, 17 Apr 2024 10:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713349065; bh=WYg94CWKGt7ljPqG0plyThyxy7+wQ4vCpR7U11Kwsx4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rZu0XvHqhSR64auLyaWlmCaAnJyU/Bfh/wC2c27dW2ffQPzKgHmyVZq8ZhukIFKOn 2UYJDRxU7ppGetXJcffcTcn90BRKIEqzugG9BBXi+keSEtWxX0lypgWPn5UBwuCEJ8 +tL7wsV2T2QzTk/n8GiMrhObEu1Qi3zrq23wcoOY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26856: net: sparx5: Fix use after free inside sparx5_del_mact_entry Date: Wed, 17 Apr 2024 12:17:29 +0200 Message-ID: <2024041724-CVE-2024-26856-3dbf@gregkh> X-Mailer: git-send-email 2.44.0 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=2559; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WYg94CWKGt7ljPqG0plyThyxy7+wQ4vCpR7U11Kwsx4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyC7ekyEacD0zjV6malvlgpafbkaiex2vN2h65h+Ty8 n55fn1RRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkaSPDgp0Xw062LN8uOk9x f8rE+xsvXAtPtmWY71c8y3TLtbi5vFOU59e8dTJaPL9fEwA= 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: sparx5: Fix use after free inside sparx5_del_mact_entry Based on the static analyzis of the code it looks like when an entry from the MAC table was removed, the entry was still used after being freed. More precise the vid of the mac_entry was used after calling devm_kfree on the mac_entry. The fix consists in first using the vid of the mac_entry to delete the entry from the HW and after that to free it. The Linux kernel CVE team has assigned CVE-2024-26856 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit b37a1bae742f and fixed in 5.15.152 with commit e46274df1100 Issue introduced in 5.14 with commit b37a1bae742f and fixed in 6.1.82 with commit 0de693d68b0a Issue introduced in 5.14 with commit b37a1bae742f and fixed in 6.6.22 with commit e83bebb718fd Issue introduced in 5.14 with commit b37a1bae742f and fixed in 6.7.10 with commit 71809805b950 Issue introduced in 5.14 with commit b37a1bae742f and fixed in 6.8 with commit 89d72d4125e9 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-2024-26856 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/microchip/sparx5/sparx5_mactable.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/e46274df1100fb0c06704195bfff5bfbd418bf64 https://git.kernel.org/stable/c/0de693d68b0a18d5e256556c7c62d92cca35ad52 https://git.kernel.org/stable/c/e83bebb718fd1f42549358730e1206164e0861d6 https://git.kernel.org/stable/c/71809805b95052ff551922f11660008fb3666025 https://git.kernel.org/stable/c/89d72d4125e94aa3c2140fedd97ce07ba9e37674