Perl -- heap buffer overflow when transliterating non-ASCII bytes
· CVE-2024-56406 · VuXML entry
9b29abf9-4ab0-4765-b253-1875cd9b441e reports: A heap buffer overflow vulnerability was discovered in Perl. When there are non-ASCII bytes in the left-hand-side of the `tr` operator, `S_do_trans_invmap` can overflow the destination pointer `d`. $ perl -e '$_ = "\x{FF}" x 1000000; tr/\xFF/\x{100}/;' Segmentation fault (core dumped) It is believed that this vulnerability can enable Denial of Service and possibly Code …
Affected versions
- perl5.36 < 5.36.3
- perl5.38 < 5.38.4
- perl5.40 < 5.40.2
- perl5-devel < 5.41.10
By system
1 still vulnerable, 4 fixed. Where VuXML applies (FreeBSD, DragonFly, FreeBSD's derivatives) a port is vulnerable while its version is in a range; pkgsrc says itself whether it lists a CVE of this advisory; OpenBSD and MidnightBSD keep no list this site reads, so their row is only an estimate: FreeBSD's ranges applied to upstream's version.
| System | Port | Version | State | Fixed |
|---|---|---|---|---|
| DragonFly | lang/perl5.38 | 5.38.4 | fixed | |
| DragonFly | lang/perl5.40 | 5.40.2 | fixed | |
| MidnightBSD | lang/perl5.40 | 5.40.5 | out of range, by version | |
| FreeBSD | lang/perl5.40 | 5.40.5 | fixed | |
| DragonFly | lang/perl5-devel | 5.41.3 | vulnerable since 2025-04-15 | |
| FreeBSD | lang/perl5-devel | 5.45.4 | fixed |