BSD Ports

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

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.

SystemPortVersionStateFixed
DragonFlylang/perl5.385.38.4 fixed
DragonFlylang/perl5.405.40.2 fixed
MidnightBSDlang/perl5.405.40.5 out of range, by version
FreeBSDlang/perl5.405.40.5 fixed
DragonFlylang/perl5-devel5.41.3 vulnerable since 2025-04-15
FreeBSDlang/perl5-devel5.45.4 fixed