CVE-2026-143374: ptp: unwind partially completed virtual clock creation
In the Linux kernel, the following vulnerability has been resolved:
ptp: unwind partially completed virtual clock creation
nvclocksstore() publishes the new clock count only after every child has been registered. If a later registration fails, it returns without unregistering the children already created by that request. Those clocks are left out of nvclocks, and a subsequent request can overwrite their index entries without removing them.
Unregister the newly created children in reverse order and clear their index entries on failure. Leave the previously installed clocks and their count unchanged. The nvclocks mutex serializes this rollback with other sysfs changes, and parent removal drains the store before walking the children.
This was found by code inspection while adding initial PHC sample error handling to virtual clock registration.
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.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - 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 - Compensating control
On virtual clock registration failure, unregister the newly created children in reverse order, clear their index entries, and leave previously installed clocks and the published clock count unchanged.
Event History
Frequently Asked Questions
Which systems are affected in practice?
Systems that create PTP virtual clocks through n_vclocks are affected when registration of a later child clock fails after one or more child clocks have already been registered. The issue concerns partial virtual-clock creation failures rather than successful creation requests.
What happens after a partial creation failure?
Previously created child clocks from the failed request can remain registered but are not included in n_vclocks. A subsequent request can overwrite their index entries without first removing those leftover clocks.
What does the fix do when virtual clock creation fails?
It unregisters children created by the failed request in reverse order and clears their index entries. Previously installed clocks and the published clock count are left unchanged.