CVE-2026-62381

luci-lib-px5g (LuCI) contains a heap-based buffer overflow in the native ASN.1 encoding routine asn1_add_obj (x509write.c) when signing a certificate with a 2040-bit RSA key. For a 255-byte signature, the BIT STRING allocation is computed from the DER length encoding of 255 bytes, but the payload written after prepending the unused-bits byte is 256 bytes, requiring one additional DER length octet. As a result the allocation is 259 bytes while the tag, length, unused-bits byte, and signature require 260 bytes, and the final memcpy writes one byte beyond the heap buffer. The overflow is reachable through the exported Lua interface via create_selfsigned(); whether it is remotely exploitable depends on the embedding application. The vulnerable code is present on the openwrt-18.06 through openwrt-25.12 release branches and is absent from master, where the luci-lib-px5g package has been removed rather than patched.
Configurations

No configuration.

History

12 Oct 2026, 16:10

Type Values Removed Values Added
Summary
  • (es) luci-lib-px5g (LuCI) contiene un desbordamiento de búfer basado en montículo en la rutina de codificación ASN.1 nativa asn1_add_obj (x509write.c) al firmar un certificado con una clave RSA de 2040 bits. Para una firma de 255 bytes, la asignación de BIT STRING se calcula a partir de la codificación de longitud DER de 255 bytes, pero la carga útil escrita después de anteponer el byte de bits no utilizados es de 256 bytes, lo que requiere un octeto de longitud DER adicional. Como resultado, la asignación es de 259 bytes mientras que la etiqueta, la longitud, el byte de bits no utilizados y la firma requieren 260 bytes, y el memcpy final escribe un byte más allá del búfer del montículo. El desbordamiento es alcanzable a través de la interfaz Lua exportada mediante create_selfsigned(); si es explotable remotamente depende de la aplicación incrustada. El código vulnerable está presente en las ramas de lanzamiento openwrt-18.06 hasta openwrt-25.12 y está ausente de master, donde el paquete luci-lib-px5g ha sido eliminado en lugar de parcheado.

Information

Published : 2026-08-22 13:16

Updated : 2026-10-12 16:10


NVD link : CVE-2026-62381

Mitre link : CVE-2026-62381

CVE.ORG link : CVE-2026-62381


JSON object : View

Products Affected

No product.

CWE
CWE-122

Heap-based Buffer Overflow