CVE-2026-143220: net/mlx5: Use only loaded devices for PTP clock operations
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Use only loaded devices for PTP clock operations
The PTP periodic worker and PTP operations access PCI registers through the function backing the PTP clock. The PTP clock remains registered when a PCI function is suspended, so these paths can still access the function after it has been unloaded.
To fix that, serialize clock hardware access with the clock mutex for all clocks and fail callbacks with -EAGAIN when there is no loaded function to service the clock. Additionally, tie the worker's lifetime to load/unload and use the devcom lock to synchronize with peer loads/unloads.
Since the periodic worker is stopped during unload, the free running counter may wrap without being sampled. Reinitialize the timecounter on load using the hardware real time clock in real time mode, or the saved PHC time plus elapsed CLOCKBOOTTIME in free running mode.
This provides best effort PHC continuity across unload/load. In free running mode, elapsed time while unloaded is estimated using CLOCKBOOTTIME rather than the PHC's adjusted frequency.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.7 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using the mlx5 PTP clock are relevant when its backing PCI function can be suspended or unloaded while the PTP clock remains registered. The affected paths are PTP callbacks and the periodic PTP worker, which may otherwise access PCI registers after the function is unavailable.
What operational behavior should be expected after the fix?
PTP clock callbacks return -EAGAIN when no loaded PCI function is available to service them. The periodic worker is stopped during unload and restarted with the device; PHC time continuity across unload and reload is best effort, with free-running mode estimating elapsed time using CLOCK_BOOTTIME.