CVE-2026-59144

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

Published Jul 21, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Remediation

Vendor Solution

Upgrade to Data::RingBuffer::Shared 0.04 or later, which pins elem_size to the fixed element size of the buffer's registered variant.


Vendor Workaround

For deployments that cannot upgrade to 0.04, place the backing file in a directory writable only by the owning user, so a local peer cannot tamper with the elem_size the read path trusts.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Egor
Egor data::ringbuffer::shared
Vendors & Products Egor
Egor data::ringbuffer::shared
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Data::RingBuffer::Shared versions before 0.04 for Perl allow a stack buffer overflow via an unvalidated elem_size in ring_read_seq
Weaknesses CWE-121
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Jul 22, 2026, 7:33 PM
Reserved
Jul 2, 2026, 4:24 PM
Status
Deferred
Published
Jul 21, 2026, 8:17 PM
Modified
Oct 24, 2026, 7:10 PM