CVE-2026-53222

ptp: ocp: fix resource freeing order

Published Jun 25, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Linux kernel contains a use‑after‑free flaw in the PTP OC driver. When the driver is unloaded, its resources are freed before the clock has been unregistered, causing memory corruption that an attacker could leverage to crash the kernel or execute arbitrary code. This weakness arises from an improper order of resource freeing introduced by earlier changes to the clock handling API.

Affected Systems

The vulnerability affects Linux kernel builds that include the PTP OC driver prior to the integration of commits a60fc3294a37 and aa03698bb28d3be5ee180adb185395054b342b04. All kernel releases that have not applied these commits are susceptible.

Risk and Exploitability

The CVSS score is 5.5, indicating a moderate severity. The EPSS score is below 1%, indicating a very low probability of exploitation. The vulnerability stems from improper resource freeing order in the PTP OC driver, reflecting CWE-401. An attacker with kernel privileges could trigger a use‑after‑free during driver removal, potentially leading to a kernel crash or arbitrary code execution. The vulnerability is not yet listed in the CISA KEV catalog. Based on the description, the likely attack vector involves a privileged attacker unloading or removing the PTP OC driver, which could occur during system maintenance or malicious activity.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes commits a60fc3294a37 or aa03698bb28d3be5ee180adb185395054b342b04.
  • If an upgrade is not possible, cherry‑pick the current kernel source tree.
  • If the PTP OC driver is unnecessary for your environment, disable or remove it from the kernel configuration to eliminate the risk.

Generated by OpenCVE AI on August 13, 2026 at 18:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8726-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8727-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-2 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-3 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8800-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-2 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
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.
Title ptp: ocp: fix resource freeing order
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 15, 2026, 10:07 AM
Reserved
Jun 9, 2026, 7:44 AM
Status
Modified
Published
Jun 25, 2026, 9:16 AM
Modified
Oct 15, 2026, 11:17 AM
Severity
Public date
Jun 25, 2026, 12:00 AM