← CVE Veritabanı

CVE-2026-13214

Kritik

Teknik Veri (Otomatik)

CVSS Skoru
9.8
EPSS
0.5%
CWE
CWE-787
KEV Durumu
Hayır

Yayım tarihi: 25 Ağustos 2026

OCPP 1.6 istemcisindeki subsys/net/lib/ocpp/ocpp_j.c, parse_getconfig_msg()'de bir yığın tampon taşması içerir. Merkezi sistemden gelen bir GetConfiguration isteğini işlerken, işleyici saldırganın kontrol ettiği JSON "anahtar" dizesini, sınırsız bir strcpy() kullanarak çağırıcının sabit 50 baytlık yığın tamponuna (subsys/net/lib/ocpp/ocpp.c'de bildirilen skey[CISTR50]) kopyalar. Çözümlenmiş anahtar değeri doğrudan alıcı tamponuna işaret eder, bu nedenle uzunluğu yalnızca mesaj boyutu (CONFIG_OCPP_RECV_BUFFER_SIZE, varsayılan 2048) ile sınırlıdır. GetConfiguration mesajı, şarj noktasının yapılandırılmış merkezi sistemine açtığı WebSocket bağlantısı üzerinden teslim edilir. Reader thread ocpp_wsreader(), mesajı ui->recv_buf'a okur ve PDU işlev tablosu aracılığıyla parse_getconfig_msg()'e iletir. Merkezi sistem uç noktasını kontrol eden veya şifresiz bir bağlantı上的 bir man-in-the-middle saldırganı, "anahtar" alanını 50 baytı aşan bir GetConfiguration isteğini gönderebilir ve reader thread'in yığınını saldırgan tarafından seçilen baytlarla aşabilir. Sonuç, OCPP reader thread'inde uzaktan tetiklenebilir bir yığın ezilmesidir: asgari bir hizmet reddi ve derleme zamanı sertleşmesi gibi yığın canavarları ve MPU yapılandırmasına bağlı olarak muhtemelen uzaktan kod yürütme. Düzeltme, strcpy()'i sınırlı bir strncpy(key, payload.key[0], CISTR50 - 1) ile değiştirir ve ardından açık bir NUL sonlandırması ekler, bu da zaten kardeş işleyiciler tarafından kullanılan sınırlı kopyaları eşler.

Orijinal açıklama (İngilizce)

The OCPP 1.6 client in subsys/net/lib/ocpp/ocpp_j.c contains a stack buffer overflow in parse_getconfig_msg(). When handling a GetConfiguration request from the central system, the handler copied the attacker-controlled JSON "key" string into the caller's fixed 50-byte stack buffer (skey[CISTR50], declared in subsys/net/lib/ocpp/ocpp.c) using an unbounded strcpy(). The parsed key value points directly into the receive buffer, so its length is bounded only by the message size (CONFIG_OCPP_RECV_BUFFER_SIZE, default 2048). The GetConfiguration message is delivered over the WebSocket connection that the charge point opens to its configured central system. The reader thread ocpp_wsreader() reads the message into ui->recv_buf and dispatches it to parse_getconfig_msg() via the PDU function table. An attacker who controls the central system endpoint, or a man-in-the-middle on an unencrypted connection, can send a GetConfiguration request whose "key" field exceeds 50 bytes and overflow the reader thread's stack with attacker-chosen bytes. The consequence is a remotely triggerable stack smash on the OCPP reader thread: at minimum a denial of service, and plausibly remote code execution depending on build-time hardening such as stack canaries and MPU configuration. The fix replaces the strcpy() with a bounded strncpy(key, payload.key[0], CISTR50 - 1) followed by explicit NUL termination, matching the bounded copies already used by the sibling handlers.

Bu CVE için henüz editoryal inceleme yapılmadı. Sadece otomatik teknik veri gösteriliyor.