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 9B0B5205E30 for ; Tue, 1 Apr 2025 15:41:44 +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=1743522105; cv=none; b=eQp32B2wfCJwn2wiph41GnXu/74FBdrgs3WHCcfeMb5QGjGe3amj/JTdreUxwuw8neg/nxkSMSMQYS4U+sIrlFvIUMJOay+gasXg5aIdRmVjRNjSb8eWh+P8rhRr90KWm9iVDNHKIF24CbBu5mUDjM4nVE8A/b7CAUu20CN+xxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522105; c=relaxed/simple; bh=rvGiNlF+Gt15zpyux90tmO8dl3uY65QXdmvtXrHg2XI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ju4cHcEfyObjaF7Aq243PoCbF97mmW8q5GqgWXAa+KRc54Zz0DISTKpEr0X0wI14/nN8JzP1yLlRpiVomgdLXtL/KzCgwP7wBCK2/KWJ8Ar4DofKaU4L/hVJRwwegMZersf1UazCe5SnoHHR7K+fF22tK+HpoRTctOPJsBAEpqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JvlqY7/O; 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="JvlqY7/O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC51FC4CEE4; Tue, 1 Apr 2025 15:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522104; bh=rvGiNlF+Gt15zpyux90tmO8dl3uY65QXdmvtXrHg2XI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JvlqY7/OesKtpUbw6/tNpvT7UeOyOFnf7KKZHXM4hotpKhllAaR3AIKI3O+943kuT CTfpBJQo4iRheIdli7D86OaG+0p0tznMfNRvjEL7pRGIuX5IZ5ovQFJsEZcVUrC6cO OdezDTMie2nF4zZcPT+YJkN1EYXHL09vao8fSllA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21924: net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error Date: Tue, 1 Apr 2025 16:39:48 +0100 Message-ID: <2025040132-CVE-2025-21924-3a08@gregkh> X-Mailer: git-send-email 2.49.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=2988; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rvGiNlF+Gt15zpyux90tmO8dl3uY65QXdmvtXrHg2XI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvOLZU9p3UeeXJavJD4ydrptaaC2kWeR1mqRdSZ3SaM yUZzM7uiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlEqjHMz9l/eKLORuEW0flN W27FzakK659oyTC/LDTqsvC2JpXS6GVnS9bVOMUcu/0XAA== 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: 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