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 A14CB39300B for ; Tue, 16 Dec 2025 13:30:43 +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=1765891843; cv=none; b=pvlXFRsYW9yRKhO0e/Zg/0oszn3hM+dxVpcvGLJfDgCdCSYE3o6kF36Lr+l5IPIBwBIsIQ0C5QuAlOI3Fn4DI/z3XOIxonahseMwdB367Qzj6mjbsn/SNFSHkQN7ZWErvjpooJTSQM2tU0GBwpB2jktKSxsiDv1FI+RQymATas0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765891843; c=relaxed/simple; bh=rhFNmsKW7okcDg14xxdjj4EBTB9GfRkyWEoz+cvHaFI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=X0wcG6zAkrdPYMGkXFX3Dq041tkX5wU9sLS4Qfc22loYRxrU1PyAz3B5/8s/HCN3Z/LRfn2L+cRVTwo8+sUoiZJFUSGtnWfxxSvd2wg0APkm2Oc17/ImS9/Vf5LSqZVn7Ck8HxzL7PSdVaWFCwdHdQpaHiIEodQs1+kqtCu0w7k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=F2+H9/rZ; 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="F2+H9/rZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80D96C4CEF1; Tue, 16 Dec 2025 13:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765891843; bh=rhFNmsKW7okcDg14xxdjj4EBTB9GfRkyWEoz+cvHaFI=; h=From:To:Cc:Subject:Date:Reply-To:From; b=F2+H9/rZTbpXGvixHdvpRNecfUfZyrBH8NEnV3atQjBzH7n7Q10QUKX+b/BxnEN9P +It5UnX0kq95xrcxaNjltGAwAldyVeV+eQGLOf8cEpeTH9+04Z3wu1J9OhIIgjbXWR CKy8jeg03Igry9l5z3nPeEdw+ifH/uKx/zehDzO4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40347: net: enetc: fix the deadlock of enetc_mdio_lock Date: Tue, 16 Dec 2025 14:30:34 +0100 Message-ID: <2025121634-CVE-2025-40347-275c@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3385; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=stK+2ZgKhy/JkK/jE5VHrUKIKMXRZjwOF7eHaimMRXc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOcb/LF2rfexMv6ySpaKg0PTUxe/t9Db0Nh5ZcMTfp2 WUgF8DTEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABO5NYthDof4covtme8YU1Ke uCe6lYmHTr4ryTBPxX6T8xPGGauSc3vXrnlw4MNHcfY1AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net: enetc: fix the deadlock of enetc_mdio_lock After applying the workaround for err050089, the LS1028A platform experiences RCU stalls on RT kernel. This issue is caused by the recursive acquisition of the read lock enetc_mdio_lock. Here list some of the call stacks identified under the enetc_poll path that may lead to a deadlock: enetc_poll -> enetc_lock_mdio -> enetc_clean_rx_ring OR napi_complete_done -> napi_gro_receive -> enetc_start_xmit -> enetc_lock_mdio -> enetc_map_tx_buffs -> enetc_unlock_mdio -> enetc_unlock_mdio After enetc_poll acquires the read lock, a higher-priority writer attempts to acquire the lock, causing preemption. The writer detects that a read lock is already held and is scheduled out. However, readers under enetc_poll cannot acquire the read lock again because a writer is already waiting, leading to a thread hang. Currently, the deadlock is avoided by adjusting enetc_lock_mdio to prevent recursive lock acquisition. The Linux kernel CVE team has assigned CVE-2025-40347 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 6d36ecdbc4410e61a0e02adc5d3abeee22a8ffd3 and fixed in 6.6.115 with commit 2781ca82ce8cad263d80b617addb727e6a84c9e5 Issue introduced in 5.12 with commit 6d36ecdbc4410e61a0e02adc5d3abeee22a8ffd3 and fixed in 6.12.56 with commit 1f92f5bd057a4fad9dab6af17963cdd21e5da6ed Issue introduced in 5.12 with commit 6d36ecdbc4410e61a0e02adc5d3abeee22a8ffd3 and fixed in 6.17.6 with commit 2e55a49dc3b2a6b23329e4fbbd8a5feb20e220aa Issue introduced in 5.12 with commit 6d36ecdbc4410e61a0e02adc5d3abeee22a8ffd3 and fixed in 6.18 with commit 50bd33f6b3922a6b760aa30d409cae891cec8fb5 Issue introduced in 5.10.24 with commit bf9c564716a13dde6a990d3b02c27cd6e39608bf Issue introduced in 5.11.7 with commit ff966263f5f9fdf9740f03fed0762ce73c230a6a 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-40347 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/freescale/enetc/enetc.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/2781ca82ce8cad263d80b617addb727e6a84c9e5 https://git.kernel.org/stable/c/1f92f5bd057a4fad9dab6af17963cdd21e5da6ed https://git.kernel.org/stable/c/2e55a49dc3b2a6b23329e4fbbd8a5feb20e220aa https://git.kernel.org/stable/c/50bd33f6b3922a6b760aa30d409cae891cec8fb5