ptp: fix use-after-free in extts_fifo_show() reading tsevqs unlocked

Summary

CVECVE-2026-99755
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-20 06:18:13 UTC
Updated2026-11-20 06:18:13 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: ptp: fix use-after-free in extts_fifo_show() reading tsevqs unlocked extts_fifo_show() walks ptp->tsevqs with list_count_nodes() and then list_first_entry() without holding ptp->tsevqs_lock, the spinlock that "protects tsevqs from concurrent access". Every other accessor of the list honours it: ptp_open() (list_add_tail), ptp_release() (list_del followed by kfree of the per-fd queue), ptp_clock_release() and ptp_clock_event() all take tsevqs_lock. extts_fifo_show() is the only one that does not. A per-fd timestamp queue is appended to tsevqs on open("/dev/ptpN") and removed and freed on close(), both under tsevqs_lock: scoped_guard(spinlock_irq, &ptp->tsevqs_lock) list_del(&queue->qlist); bitmap_free(queue->mask); kfree(queue); So a read of /sys/class/ptp/ptpN/fifo running concurrently with a close() of a /dev/ptpN fd can have list_count_nodes() walk into the queue that close() is removing and freeing, dereferencing freed memory (use-after-free) or a poisoned list pointer. Take tsevqs_lock around the list walk. The fifo only ever draws from the first queue, which is the registration-time queue created in ptp_clock_register() and freed only in ptp_clock_release(); that cannot run while the sysfs attribute is being read, so the dequeue from queue->buf under queue->lock may stay outside tsevqs_lock and the lock order is unchanged.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected d26ab5a35ad9920940a9e07665130d501b2ae1a3 3d5d16b797a5a7131bb1a1fb81e2dfbe67aa916e git Not specified
CNA Linux Linux affected d26ab5a35ad9920940a9e07665130d501b2ae1a3 3e83be2d6473118ef6625c00ec9bc6bf99002847 git Not specified
CNA Linux Linux affected d26ab5a35ad9920940a9e07665130d501b2ae1a3 6a236983e79b92d989d7179cf74927330f6606a4 git Not specified
CNA Linux Linux affected d26ab5a35ad9920940a9e07665130d501b2ae1a3 603a0c40d414ea12509fc45f2b930449a8d4aad2 git Not specified
CNA Linux Linux affected 6.7 Not specified
CNA Linux Linux unaffected 6.7 semver Not specified
CNA Linux Linux unaffected 6.12.118 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.64 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.5 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc2 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/6a236983e79b92d989d7179cf74927330f6606a4 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/3d5d16b797a5a7131bb1a1fb81e2dfbe67aa916e 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/3e83be2d6473118ef6625c00ec9bc6bf99002847 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/603a0c40d414ea12509fc45f2b930449a8d4aad2 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report