CVE-2026-16512: Out-of-bounds read in the Zephyr gPTP receive path when handling short Ethernet frames

Published Sep 18, 2026
·
Updated

gptphandlemsg() in subsys/net/l2/ethernet/gptp/gptp.c dereferenced the gPTP header returned by GPTPHDR() and switched on hdr->messagetype without first checking that the received frame carries at least sizeof(struct gptphdr) (34) bytes of payload. The header accessor gptpgethdr() deliberately never fails for a short buffer — it returns pkt->frags->data and leaves validation to its callers — so a truncated frame produced a header pointer covering memory beyond the received data. The per-message-type checks that follow do not compensate: GPTPVALIDLEN() reduces to len > 60 once the Ethernet header has been pulled, which is false for every fixed-size gPTP message, so GPTPCHECKLEN() never rejects a truncated SYNC, FOLLOWUP, PDELAYRESP or SIGNALING message.

The defect is reached by an unauthenticated peer on the same link sending an Ethernet frame with ethertype 0x88F7 to the PTP multicast address on an interface configured as a gPTP port, with CONFIGNETGPTP enabled. Because conformant Ethernet pads frames to 60 bytes, a payload shorter than 34 bytes generally requires a link that can deliver sub-minimum frames — for example the nativesim TAP driver (drivers/ethernet/ethnativetap.c), which forwards whatever length the host device supplies, or a MAC configured to accept undersized frames.

The short packet is retained (netpktref() into rcvdsyncptr, rcvdfollowupptr, rcvdpdelayrespptr or rcvdannounceptr) and later parsed by the media-dependent and media-independent state machines in subsys/net/l2/ethernet/gptp/gptpmd.c and subsys/net/l2/ethernet/gptp/gptpmi.c, which read tens of further bytes and copy some of them (the announce priority vector, hdr->portid) into state that is subsequently transmitted. Under the default fixed-size buffer allocator (CONFIGNETBUFFIXEDDATASIZE, 128-byte fragments) the accesses stay inside the allocated fragment and disclose stale recycled buffer contents; under the experimental CONFIGNETBUFVARIABLEDATASIZE allocator, where fragments are heap-allocated at the exact frame length, they are genuine out-of-bounds reads. There is no write and no availability impact.

Affected Software

1 affected component
Zephyr gPTP (GPTP in Zephyr net/l2/ethernet/gptp)

Event History

Sep 18, 2026
CVE Published
via MITRE·02:30 PM
Data Sourced
via MITRE·02:30 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Systems are exposed when CONFIG_NET_GPTP is enabled and the receiving interface is configured as a gPTP port. The vulnerable path processes gPTP Ethernet traffic identified by ethertype 0x88F7 sent to the PTP multicast address.

2

What does an attacker need to exploit this issue?

An attacker does not need authentication, privileges, or user interaction, but must be able to send a crafted frame from the same link. The frame must have a gPTP payload shorter than the 34-byte gPTP header.

3

Are ordinary physical Ethernet networks likely to deliver the required malformed frame?

Usually not: conformant Ethernet pads frames to at least 60 bytes. Exploitation is more realistic on links or drivers that can deliver sub-minimum frames, such as the native_sim TAP driver mentioned in the advisory data.

4

What can be done before a fix is applied?

Disable CONFIG_NET_GPTP or ensure affected interfaces are not configured as gPTP ports where that functionality is not required. Restrict untrusted devices from sending Ethernet traffic on links connected to gPTP-enabled interfaces.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203