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 747F61DEFE9 for ; Thu, 8 May 2025 06:39:38 +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=1746686378; cv=none; b=j1JeBlegE7kVf2C9Kb3i2RR7NDXe0qbgGKsM3Snsk3EdWzwESK+dzHGxukXDGDRHxZ5ROS1j0fGKnvF4UdhMN3ZMq0V0ClhpZQz8igLF9DbCH4PHNp8gc3bi6GjMWPXLGxWySnIfhfPiSI9baLbicLVTg1zEkfP5FFOW5v67hg8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746686378; c=relaxed/simple; bh=KXmQ/xxiZo4H8HWYkqiVYUipIvLMlrZoACvHN5U/BvE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RHTMFZMvszDCd0AyBt+CxMviF38N7C3XVpGil1PZuMnqeUpL/x++6gc4TX12dGoA5uLMdntu8lz0nGON+g4dWuRdYPo+vDD6pX0lrwUQPdPDo/MN1dUlLbJezCU3DpxyQZJQv48wiAol/A8Hesut+7eDd/OUjpOfPWFBGCBE8TI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rOqmDLzd; 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="rOqmDLzd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBCC0C4CEEB; Thu, 8 May 2025 06:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746686378; bh=KXmQ/xxiZo4H8HWYkqiVYUipIvLMlrZoACvHN5U/BvE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rOqmDLzdqM9xLTwqUvRDZnUV3/nXgbDh6rR/LibrTPhFZCspJCKg8RySw9+IiUzd3 HpThwLZjZ+ywFtvOoq/IxZUa/6X6XULVvH8Vq5AGjk7uz36qQF88Ab88n/+vpmnJZW D+qMfvGxlSocnYA6tGRHbxJD6Xs5EFgBOXCW/RfU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37800: driver core: fix potential NULL pointer dereference in dev_uevent() Date: Thu, 8 May 2025 08:39:09 +0200 Message-ID: <2025050808-CVE-2025-37800-ea7c@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=2380; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CRCK8yBugmUstmbLEELMddkP5NmF1YTB66+eNj8jLRE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkygT0fkz0bl9Zq7egS4nii6ZTIbdFyKUOjLCP53oTqf U25aa0dMSwMgkwMsmKKLF+28RzdX3FI0cvQ9jTMHFYmkCEMXJwCMJH/AQwz/r0ID/YRr1N8e2+T yD7d5RwfGw8xzI/m5GHbkKD5UpolMvyD2Av7eYUqXQA= 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: driver core: fix potential NULL pointer dereference in dev_uevent() If userspace reads "uevent" device attribute at the same time as another threads unbinds the device from its driver, change to dev->driver from a valid pointer to NULL may result in crash. Fix this by using READ_ONCE() when fetching the pointer, and take bus' drivers klist lock to make sure driver instance will not disappear while we access it. Use WRITE_ONCE() when setting the driver pointer to ensure there is no tearing. The Linux kernel CVE team has assigned CVE-2025-37800 to this issue. Affected and fixed versions =========================== Fixed in 6.6.89 with commit abe56be73eb10a677d16066f65ff9d30251f5eee Fixed in 6.12.26 with commit 2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb Fixed in 6.14.5 with commit 3781e4b83e174364998855de777e184cf0b62c40 Fixed in 6.15-rc4 with commit 18daa52418e7e4629ed1703b64777294209d2622 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-37800 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/base/base.h drivers/base/bus.c drivers/base/core.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/abe56be73eb10a677d16066f65ff9d30251f5eee https://git.kernel.org/stable/c/2b344e779d9afd0fcb5ee4000e4d0fc7d8d867eb https://git.kernel.org/stable/c/3781e4b83e174364998855de777e184cf0b62c40 https://git.kernel.org/stable/c/18daa52418e7e4629ed1703b64777294209d2622