| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-26856: net: sparx5: Fix use after free inside sparx5_del_mact_entry |
| |
| 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 b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 5.15.152 with commit e46274df1100fb0c06704195bfff5bfbd418bf64 |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.1.82 with commit 0de693d68b0a18d5e256556c7c62d92cca35ad52 |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.6.22 with commit e83bebb718fd1f42549358730e1206164e0861d6 |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.7.10 with commit 71809805b95052ff551922f11660008fb3666025 |
| Issue introduced in 5.14 with commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 and fixed in 6.8 with commit 89d72d4125e94aa3c2140fedd97ce07ba9e37674 |
| |
| 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 |