Zephyr OSDP Control Panel: Stack out-of-bounds write in reply parser
Summary
The OSDP Control Panel reply parser in Zephyr does not bound the payload length of REPLY_KEYPPAD and REPLY_RAW frames before copying them into fixed 64-byte stack buffers. An attacker who controls a peripheral device or can inject frames on the RS-485 bus can overwrite adjacent stack memory, which may crash the access-control panel or, in theory, hijack control flow. Exploitation requires the Control Panel mode with a registered event callback and adjacent bus access, and no authentication is needed.
Affected
- Zephyr from 3.3.0 up to and including 4.4.2
- Only builds with CONFIG_OSDP_MODE_CP=y and a registered event callback
- Firmware of access-control hardware that uses Zephyr: Unknown.
Fixed in
- Fix merged in commit f10d55f (main branch), projected for Zephyr 4.5.0
- Zephyr 4.3.2 release notes list the CVE as addressed
- Fix for 4.4.x maintenance releases: Unknown.
Workaround
- Disable OSDP Control Panel mode if it is not required
- Physically restrict the RS-485 bus to trusted peripherals only
- Check whether a gateway bridges the RS-485 bus to a network.
Exploitation
- CISA SSVC: Exploitation none, Automatable no, Technical Impact total
- Not listed in KEV; no public exploit or in-the-wild use found
- The advisory describes how to reproduce the issue with a malicious peripheral emulator.
Our recommendation
- Inventory OSDP access-control hardware and ask vendors whether it uses Zephyr and which version
- Request the vendor's patch timeline for Zephyr-based firmware
- Until patched, restrict physical access to the RS-485 bus and disable Control Panel functions not needed
- Re-check the advisory for a 4.4.x fix before choosing an upgrade target.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-fgg7-h8p9-9q3w github.com
- Fix commit f10d55f github.com
- Zephyr 4.3.2 release github.com
- Zephyr vulnerability documentation docs.zephyrproject.org
- OpenCVE CVE-2026-76788 app.opencve.io
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 15:45.
Original description (NVD)
The OSDP Control Panel reply parser cp_decode_response() in subsys/mgmt/osdp/src/osdp_cp.c decodes replies from a Peripheral Device into a stack-allocated struct osdp_event. For the REPLY_KEYPPAD and REPLY_RAW reply types, the payload length is taken from the received frame and the only validation performed is that the declared length is self-consistent with the number of payload bytes present in the frame. Because the attacker controls both the length field and the frame length, that check imposes no bound, and the subsequent memcpy() writes into the fixed 64-byte data arrays of struct osdp_event_keypress / struct osdp_event_cardread (OSDP_EVENT_MAX_DATALEN). The sibling REPLY_FMT handler in the same switch already carried the missing > OSDP_EVENT_MAX_DATALEN bound. The defect is reached from cp_process_reply(), which reads bytes from the OSDP RS-485 channel and passes them through osdp_phy_check_packet() and osdp_phy_decode_packet() before dispatching on the reply ID. Triggering it requires CONFIG_OSDP with CONFIG_OSDP_MODE_CP and an application event callback registered (the normal Control Panel integration), plus a frame carrying a correct SOM, a valid CRC-16, and a matching 2-bit sequence number — all of which are computable or observable by anyone on the bus. No check ties the reply ID to the outstanding command, so an oversized REPLY_KEYPPAD or REPLY_RAW is accepted as the answer to a routine CMD_POLL. A malicious or compromised card reader, or anyone with access to the RS-485 wiring, can supply such a frame; CONFIG_OSDP_SC_ENABLED only helps while a secure channel is active, and a single unauthenticated frame carrying a bad MAC causes sc_deactivate(), after which plaintext replies are again accepted. With the default CONFIG_OSDP_UART_BUFFER_LENGTH of 256, roughly 180 bytes of fully attacker-chosen data can be written past the end of the stack-allocated event object, over saved registers and the return address on typical Cortex-M and RISC-V frame layouts (Zephyr does not enable stack canaries by default). The impact ranges from a hard crash of the access-control panel to potential control-flow hijack in the context of the OSDP receive thread. The fix adds an OSDP_EVENT_MAX_DATALEN bound to both handlers, capping each memcpy() at the size of its destination.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
