---
id: CVE-2026-53222
title: |-
  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 change…
summary: |-
  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 change…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-401
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 6.18, < 7.0.13'
  - linux_kernel = 7.1
patched:
  - linux_kernel 7.0.13
published: '2026-06-25'
updated: '2026-07-02'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-53222'
references:
  - url: 'https://git.kernel.org/stable/c/627366c51145a07f675b1800fb5ea2ec960bd900'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/aa03698bb28d3be5ee180adb185395054b342b04'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
tags:
  - nvd
epss: 0.00107
epssPercentile: 0.01065
ingestedAt: '2026-07-03T13:02:28.061Z'
---

## Overview

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.

## Affected

- `linux_kernel >= 6.18, < 7.0.13`
- `linux_kernel = 7.1`

## Remediation

Upgrade past the affected range:

- `linux_kernel 7.0.13`
