CVE-2026-59144
JSON

9.8critical

Data::RingBuffer::Shared versions before 0.04 for Perl allow a stack buffer overflow via an unvalidated elem_size in ring_read_seq

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.46% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

Description

Data::RingBuffer::Shared versions before 0.04 for Perl allow a stack buffer overflow via an unvalidated elem_size in ring_read_seq. The attach-time validator ring_validate_header checks the capacity-overflow and total_size consistency of the header but never caps elem_size against the destination size. ring_read_seq does memcpy(out, ring_slot(h, seq), elem_size) with elem_size read raw from the mmap'd segment, copying into a fixed 8-byte destination scalar. An elem_size larger than 8 bytes writes past the destination. A local peer that can write the backing file can leave the header valid while setting a large elem_size, so the next read copies a file-controlled length into the fixed 8-byte stack buffer, corrupting adjacent stack frames.

Affected

Product or packageVersionsReported by
Data-RingBuffer-Sharedbefore 0.04CVE List

Classification

CWE-121

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Data::RingBuffer::Shared versions before 0.04 for Perl allow a stack buffer overflow via an unvalidated elem_size in ring_read_seq. The attach-time validator ring_validate_header checks the capacity-overflow and total_size consistency of the header but never caps elem_size against the destination size. ring_read_seq does memcpy(out, ring_slot(h, seq), elem_size) with elem_size read raw from the mmap'd segment, copying into a fixed 8-byte destination scalar. An elem_size larger than 8 bytes writes past the destination. A local peer that can write the backing file can leave the header valid while setting a large elem_size, so the next read copies a file-controlled length into the fixed 8-byte stack buffer, corrupting adjacent stack frames.

NVD (es)

Las versiones de Data::RingBuffer::Shared anteriores a la 0.04 para Perl permiten un desbordamiento de búfer de pila a través de un elem_size no validado en ring_read_seq. El validador en tiempo de adjunción ring_validate_header verifica la consistencia de desbordamiento de capacidad y total_size del encabezado, pero nunca limita elem_size con respecto al tamaño de destino. ring_read_seq realiza memcpy(out, ring_slot(h, seq), elem_size) con elem_size leído directamente del segmento mapeado en memoria, copiando en un escalar de destino fijo de 8 bytes. Un elem_size mayor de 8 bytes escribe más allá del destino. Un par local que puede escribir el archivo de respaldo puede dejar el encabezado válido mientras establece un elem_size grande, de modo que la siguiente lectura copia una longitud controlada por el archivo en el búfer de pila fijo de 8 bytes, corrompiendo los marcos de pila adyacentes.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-59144 changed 2026-07-22CVE Terms of Use
NVDCVE-2026-59144 changed 2026-10-24Public domain