Convert-ASN1に、細工されたBERヘッダーでメモリを枯渇させられる脆弱性
Summary
Convert-ASN1の0.37より前のバージョンには、asn_recvでメモリを使い果たさせられる脆弱性があります。不完全なBERヘッダーを1つ送られるだけで、受信バッファが際限なく倍増し、プロセスが停止するおそれがあります。修正版の0.37で対処できるため、利用しているバージョンを確認し、0.37以降へ更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Convert-ASN1の0.37より前のバージョンには、asn_recvでメモリを使い果たさせられる脆弱性があります。不完全なBERヘッダーを1つ送られるだけで、受信バッファが際限なく倍増し、プロセスが停止するおそれがあります。修正版の0.37で対処できるため、利用しているバージョンを確認し、0.37以降へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| CPANConvert-ASN1 |
< 0.37→ 0.37 |
0.37 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Alpine Linux ALPINE-CVE-2026-126568 perl-convert-asn1 Fix available
- Debian DEBIAN-CVE-2026-126568 libconvert-asn1-perl Fix available
- Ubuntu UBUNTU-CVE-2026-126568 libconvert-asn1-perl No fixed version in this record
Original description The description as published by the source.
Convert::ASN1 versions before 0.37 for Perl allow memory exhaustion via unbounded MSG_PEEK buffer doubling in asn_recv.
asn_recv peeks the socket in a loop, doubling the buffer size on each pass until a tag and length can be decoded. An inverted boolean guard ($tb || rather than $tb &&) prevents the need-more-data exit from firing once a tag byte has been decoded. When asn_decode_length returns no value because the length is absent or incomplete, no exit fires for that case either. MSG_PEEK leaves socket data unconsumed, so each re-peek returns at once while the buffer size doubles.
A single truncated BER header sent to a process calling asn_recv doubles the peek buffer until memory is exhausted. Perl's realloc failure is fatal and not catchable with eval.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory metacpan.org
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- report github.com
- web cpan.org
- web github.com