| From bippy-7c5fe7eed585 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-2025-21924: net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error |
| |
| During the initialization of ptp, hclge_ptp_get_cycle might return an error |
| and returned directly without unregister clock and free it. To avoid that, |
| call hclge_ptp_destroy_clock to unregist and free clock if |
| hclge_ptp_get_cycle failed. |
| |
| The Linux kernel CVE team has assigned CVE-2025-21924 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.14 with commit 8373cd38a8888549ace7c7617163a2e826970a92 and fixed in 5.15.179 with commit b7d8d4529984e2d4a72a6d552fb886233e8e83cb |
| Issue introduced in 5.14 with commit 8373cd38a8888549ace7c7617163a2e826970a92 and fixed in 6.1.131 with commit 33244e98aa9503585e585335fe2ceb4492630949 |
| Issue introduced in 5.14 with commit 8373cd38a8888549ace7c7617163a2e826970a92 and fixed in 6.6.83 with commit 2c04e507f3a5c5dc6e2b9ab37d8cdedee1ef1a37 |
| Issue introduced in 5.14 with commit 8373cd38a8888549ace7c7617163a2e826970a92 and fixed in 6.12.19 with commit 9cfc43c0e6e6a31122b4008d763a2960c206aa2d |
| Issue introduced in 5.14 with commit 8373cd38a8888549ace7c7617163a2e826970a92 and fixed in 6.13.7 with commit 21dba813d9821687a7f9aff576798ba21a859a32 |
| Issue introduced in 5.14 with commit 8373cd38a8888549ace7c7617163a2e826970a92 and fixed in 6.14 with commit b7365eab39831487a84e63a9638209b68dc54008 |
| |
| 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-2025-21924 |
| 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/hisilicon/hns3/hns3pf/hclge_ptp.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/b7d8d4529984e2d4a72a6d552fb886233e8e83cb |
| https://git.kernel.org/stable/c/33244e98aa9503585e585335fe2ceb4492630949 |
| https://git.kernel.org/stable/c/2c04e507f3a5c5dc6e2b9ab37d8cdedee1ef1a37 |
| https://git.kernel.org/stable/c/9cfc43c0e6e6a31122b4008d763a2960c206aa2d |
| https://git.kernel.org/stable/c/21dba813d9821687a7f9aff576798ba21a859a32 |
| https://git.kernel.org/stable/c/b7365eab39831487a84e63a9638209b68dc54008 |