# CVE-2026-12520: Stack buffer overflow and off-by-one writes in Zephyr HL7800 modem AT response handlers

- Severity: Medium 6.4 (CVSS:3.1, scored by zephyr) `CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-08-18T19:41:07.446Z
- Modified: 2026-11-04T05:18:39.630Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: zephyr

## Description

The Sierra Wireless HL7800 cellular modem driver (drivers/modem/vendor_standalone/hl7800.c, located at drivers/modem/hl7800.c in v4.4.0 and earlier) parses AT responses with roughly twenty handlers that call net_buf_linearize(value, sizeof(value), *buf, 0, len) into a 128-byte stack buffer and then write value[out_len] = 0. Because net_buf_linearize() (lib/net_buf/buf.c) can return a count equal to its destination-length argument, a field that exactly fills the buffer makes the terminating NUL land one byte past the end, a single-byte out-of-bounds write into adjacent stack memory.

The +KCELLMEAS cell-measurement handler on_cmd_atcmdinfo_rssi() is worse: it passed the wire length len as the destination size (net_buf_linearize(value, len, *buf, 0, len)), so a response line longer than 128 bytes overflows the value stack buffer with attacker-influenceable content. The line length comes from net_buf_findcrlf(), which accumulates bytes across the whole net_buf fragment chain and is not bounded to 128, so an over-long line reaches the defect.

The data originates from the cellular modem over UART, driven by the network: operator-scan results, +CGCONTRDP IP/DNS info, socket indications, and +KCELLMEAS neighbour-cell reports. An attacker able to shape what the modem emits — a rogue base station, a compromised modem baseband, or a remote peer feeding oversized response framing — can drive a line past 128 bytes. The handlers run in the driver's RX thread in kernel context, so the corruption is kernel-side.

The +KCELLMEAS path is a full stack buffer overflow whose worst case is code execution in kernel context and whose floor is a reliable crash; the remaining sites are single-byte NUL out-of-bounds writes. Exploitation requires the modem to emit an over-long AT response line, giving high attack complexity over an adjacent (cellular radio) vector. The fix passes sizeof(dst) - 1 (and correct explicit bounds for the IMSI and +KCELLMEAS sites) so the terminator always stays in bounds.

(As written by CVE List.)

## Affected

- zephyr: from 2.4.0 before 4.3.2; from 4.4.0 before 4.4.2

## References

- <https://github.com/zephyrproject-rtos/zephyr/commit/ea91f9375677aa4268e4044e096902dbe789f101> (patch)
- <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-9xc4-j5x8-v6jx>

## Sources

- CVE List: [CVE-2026-12520](https://www.cve.org/CVERecord?id=CVE-2026-12520), CVE Terms of Use, modified 2026-11-04
- NVD: [CVE-2026-12520](https://nvd.nist.gov/vuln/detail/CVE-2026-12520), Public domain, modified 2026-11-04

---

Page: https://cve.day/CVE-2026-12520 · Whole record: https://cve.day/CVE-2026-12520.json · Rebuilt by cve.day 2026-11-25T22:59:33.559Z
