Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 51795384248 for ; Thu, 25 Jun 2026 08:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782377240; cv=none; b=Z94NmW69Q1Pkmu+c3XzVF6fDYT+Q/avyy4DR6WIMJRB1n6tf1SgKjg/AgVUksoGD2fO1WKIKTBusnFcM70PDkSfVXuD3nnr4WGLcz8KXV+2n7ClLIoGr4QoovYzJ9PLFStoBCh+fiTIMwaYFOeifKQU6ZcrKtlM5bcA/XStpRVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782377240; c=relaxed/simple; bh=b8YIYfQGndRceFM4yHmDqKaC9KyY1TGqoivpXl/b350=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gf1eGUNT57OJsBxk006PF72KRTTsW3Hs9f/eDjoEXRoZ369Fscmx80sLAjO/uzVNT+gj75iimbucWhWyXDVqZFFhXSrHvVP+MiWkV/wrZD6wqiiwpsm4PNyKHYNHds9PzUzm1hxjD6Kyk6QhH38qt9P4giefYVmbppX4Z6Aipmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JfcXOnVH; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JfcXOnVH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 959711F000E9; Thu, 25 Jun 2026 08:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782377239; bh=RH/keP4VIiy2fwT1SclkV5tfDPkMdYJo4yYFLDI9z5o=; h=From:To:Cc:Subject:Date:Reply-To; b=JfcXOnVHM0IHQphhsFBV5Hd25AkcAfkNM85TDgXb66+BA0Ip5qnfgs36jLVzgWk0z 7oE9ev+hLpmODwt029SAWwGCLdPY3aUXmieRidbk8tBc2RbMPF8LAzpZGG06r++MOw cDqFsOb9cONFghrTER3U8X6a+Lc4+25mwvN0L2P0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53222: ptp: ocp: fix resource freeing order Date: Thu, 25 Jun 2026 09:41:10 +0100 Message-ID: <2026062506-CVE-2026-53222-9c60@gregkh> X-Mailer: git-send-email 2.54.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=2293; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Mg/Mg+lylWHFPGHbGqygfMfmFv0ddCTBnL3iSkdMlms=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2L9MuRpq8XnTDpa7i9Y6l7QfdyxL285+0LN8RdVEt6 PwjE+6DHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR/aUM8yPea3aUy5xv2FYQ K8PoZCfoatGizzA/pq1I1OGGhuHc7DNOr1JLWA0+z34PAA== 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: ptp: ocp: fix resource freeing order Commit a60fc3294a37 ("ptp: rework ptp_clock_unregister() to disable events") added a call to ptp_disable_all_events() which changes the configuration of pins if they support EXTTS events. In ptp_ocp_detach() pins resources are freed before ptp_clock_unregister() and it leads to use-after-free during driver removal. Fix it by changing the order of free/unregister calls. To avoid irq handler running on the other core while ptp device unregistering, call synchronize_irq() after HW is configured to stop producing irqs and no irqs are in-flight. The Linux kernel CVE team has assigned CVE-2026-53222 to this issue. Affected and fixed versions =========================== Issue introduced in 6.18 with commit a60fc3294a377204664b5484e4a487fa124155da and fixed in 7.0.13 with commit aa03698bb28d3be5ee180adb185395054b342b04 Issue introduced in 6.18 with commit a60fc3294a377204664b5484e4a487fa124155da and fixed in 7.1 with commit 627366c51145a07f675b1800fb5ea2ec960bd900 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-2026-53222 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_ocp.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/aa03698bb28d3be5ee180adb185395054b342b04 https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900