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 EEAF0BE46 for ; Sat, 16 Aug 2025 11:14:27 +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=1755342868; cv=none; b=dFm5vCBz6KZwr94pnUr1Kr3w4XsMA2+9HhYn22ZDXXIpWPfTU7GvoWgeyVVcquUapDiCZsNrr52gShctd7iEHM4Gp3XAnNAligVMsWCoCYcWplC8q2hjREFUuw2VC09hJia+kqr/9llhKfSHuidObI01OxSIbhx9wCoK65UhqDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755342868; c=relaxed/simple; bh=baQSBi0vWDwG/jBOXnkbcKX75dUVvzT5TOpBG0T7sN8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PfWgsK4hdPWdMMpw1sWdga/Eog2iY+LYP7DpJA3REeefq8p3Y3PTs9FJ87MzVl01kIlw44slwIM2Z7390NfKyyrDHwY9sZIYv156Z4inXyXrSUiwqOBfPjLC0ApXRvC5ls54Jf2gw4QTCXBl/VKhgi6eEF+NLumLDkCeCmaZw0A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=u2fyBa99; 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="u2fyBa99" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AE4DC4CEEF; Sat, 16 Aug 2025 11:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755342867; bh=baQSBi0vWDwG/jBOXnkbcKX75dUVvzT5TOpBG0T7sN8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=u2fyBa99WpYcMMOlIqwvijjeSZxMWk2qSUAfJlLzF7sgeG0jQDnm48HXDZiiNnbTS 5mW85v+eP/mD7xpNuwvJgpz04U5PwO7nlpc55ql/J2YxiHeHbJeEZ+4BMkWtRkqam+ 1I59w4A9SZWg8VHZbL8xT8mRfq8S7XgvM4kcbKVU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38537: net: phy: Don't register LEDs for genphy Date: Sat, 16 Aug 2025 13:14:08 +0200 Message-ID: <2025081657-CVE-2025-38537-180a@gregkh> X-Mailer: git-send-email 2.50.1 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=3206; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dq/wsH6sxdZ5w0Y4w8Bt24wJJvDICY0RYyzkJkpz/38=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkL0r/eeRPHuz7gJads59rtJ4viHzzLuxxb+qu/0uXk1 mWPl0xe1xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATWfOAYcF+1h9/HN68cWEt /py1w8/VZYk+/1yGeUbpa2ZvkfkbmdzA68t80E6G47TsQwA= 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: phy: Don't register LEDs for genphy If a PHY has no driver, the genphy driver is probed/removed directly in phy_attach/detach. If the PHY's ofnode has an "leds" subnode, then the LEDs will be (un)registered when probing/removing the genphy driver. This could occur if the leds are for a non-generic driver that isn't loaded for whatever reason. Synchronously removing the PHY device in phy_detach leads to the following deadlock: rtnl_lock() ndo_close() ... phy_detach() phy_remove() phy_leds_unregister() led_classdev_unregister() led_trigger_set() netdev_trigger_deactivate() unregister_netdevice_notifier() rtnl_lock() There is a corresponding deadlock on the open/register side of things (and that one is reported by lockdep), but it requires a race while this one is deterministic. Generic PHYs do not support LEDs anyway, so don't bother registering them. The Linux kernel CVE team has assigned CVE-2025-38537 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 01e5b728e9e43ae444e0369695a5f72209906464 and fixed in 6.6.100 with commit ec158d05eaa91b2809cab65f8068290e3c05ebdd Issue introduced in 6.4 with commit 01e5b728e9e43ae444e0369695a5f72209906464 and fixed in 6.12.40 with commit fd6493533af9e5d73d0d42ff2a8ded978a701dc6 Issue introduced in 6.4 with commit 01e5b728e9e43ae444e0369695a5f72209906464 and fixed in 6.15.8 with commit 75e1b2079ef0653a2f7aa69be515d86b7faf1908 Issue introduced in 6.4 with commit 01e5b728e9e43ae444e0369695a5f72209906464 and fixed in 6.16 with commit f0f2b992d8185a0366be951685e08643aae17d6d 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-38537 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/phy/phy_device.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/ec158d05eaa91b2809cab65f8068290e3c05ebdd https://git.kernel.org/stable/c/fd6493533af9e5d73d0d42ff2a8ded978a701dc6 https://git.kernel.org/stable/c/75e1b2079ef0653a2f7aa69be515d86b7faf1908 https://git.kernel.org/stable/c/f0f2b992d8185a0366be951685e08643aae17d6d