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 DD66F26F467 for ; Thu, 27 Feb 2025 20:06:19 +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=1740686779; cv=none; b=NvTF/DfYjuGdQn5B4Hlf5HOxGKeL4WZ5nwuGRu1ul6RPboSpMQYQE5ErP7mfjnTuG+ber1i7c/IcnQOjolhvI7r1CoL4zdJnQDEZ5Z3b4cEnY6bJmTVWrgZUGA0o0Enefu23aznZbhpeDgxVlpgh+ECm0YCDbuqT0tswEIaBn7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740686779; c=relaxed/simple; bh=2b8nMog+Y7YZN/hLXsU9b7+egDy3bn/FBRwm31sE+M4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KKPFbW/ig/zaGBkzcto81tNtKl0UK5Oa4TEUvLqfvWTukUkIOPvS+cSYBGAlEfQxZTR0mbori60J3JcfdZQd6QO4/NosZK66RTepTxw7BlJUx/duIO6JBB72OSyESoIW4uDn/hF5T/dklmStGHKK1UnqihwCdySi4nfmOMl4jo4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ChHH3MtM; 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="ChHH3MtM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B1EDC4CEDD; Thu, 27 Feb 2025 20:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740686779; bh=2b8nMog+Y7YZN/hLXsU9b7+egDy3bn/FBRwm31sE+M4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ChHH3MtMW6RMTPkurZ29KqGcpxGDM1j/u+jfkgmqn2A1pV/YiB2NWLuQRO3jMgnJA lqb99UD7uzgxMSXzoGZcURHcHfsADmdFFH85vSsK+oNvRn9AY15rHEJRQTJAH0Zieb /lwLLcNcXe8dRMWfJCyC4MNoeJmn4PNnqbYWhYLA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21822: ptp: vmclock: Set driver data before its usage Date: Thu, 27 Feb 2025 12:05:09 -0800 Message-ID: <2025022707-CVE-2025-21822-88c0@gregkh> X-Mailer: git-send-email 2.48.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=2023; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2b8nMog+Y7YZN/hLXsU9b7+egDy3bn/FBRwm31sE+M4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkHjhY/zL+/4eWhR1xdq+xmq02beiLeu3X57sLGC0HBD 14oHfpb0RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT+e/JMFdaanp41LlAoat6 n9zuT7pk4t5t+4xhfmXw2yNiXgccdydsEVx4vpXRhcc5EwA= 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: ptp: vmclock: Set driver data before its usage If vmclock_ptp_register() fails during probing, vmclock_remove() is called to clean up the ptp clock and misc device. It uses dev_get_drvdata() to access the vmclock state. However the driver data is not yet set at this point. Assign the driver data earlier. The Linux kernel CVE team has assigned CVE-2025-21822 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 20503272422693d793b84f88bf23fe4e955d3a33 and fixed in 6.13.4 with commit 6dbd8b91a065d1d8001446a28e72cd140f9acef0 Issue introduced in 6.13 with commit 20503272422693d793b84f88bf23fe4e955d3a33 and fixed in 6.14-rc3 with commit f7d07cd4f77d77f366c8ffbb8ba8b61f614e5fce 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-21822 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/ptp/ptp_vmclock.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/6dbd8b91a065d1d8001446a28e72cd140f9acef0 https://git.kernel.org/stable/c/f7d07cd4f77d77f366c8ffbb8ba8b61f614e5fce