There is a heap buffer overflow in Perl's regular expression compiler that overwrites memory allocated after the regular expression storage space with attacker supplied data. The heap overflow occurs due to a signed size_t integer overflow in the storage space calculations for nested regular expression quantifiers.
Acknowledgments: Name: ManhND (Tarantula Team), VinCSS (Vingroup)
(In reply to Todd Cullum from comment #4) > Mitigation: > > To mitigate this flaw, developers should not pass untrusted or uncontrolled > input data to the Perl regex engine for evaluation. That's not correct. The flaw requires passing an untrusted regular expression to the Perl regex compiler. The flaw does not depend on data (a subject text being) matched. And since the regular expressions in Perl can contain any arbitrary Perl code, supplying a user-provided regular expression has always been deemed a security risk.
Mitigation: To mitigate this flaw, developers should not allow untrusted regular expressions to be compiled by the Perl regular expression compiler.
The flaw is in the calculation of minimum heap storage space in the routine S_study_chunk() of regcomp.c which allows a ssize_t overflow to occur, producing a subsequent heap buffer overflow and out-of-bounds write of attacker-specified data.
Upstream Patch: https://github.com/perl/perl5/commit/897d1f7fd515b828e4b198d8b8bef76c6faf03ed
References: https://github.com/Perl/perl5/compare/v5.30.2...v5.30.3 https://github.com/Perl/perl5/blob/blead/pod/perl5303delta.pod
Created perl tracking bugs for this issue: Affects: fedora-all [bug 1844662]
The fixes are now published in Perl versions 5.28.3 and 5.30.3. https://metacpan.org/pod/release/XSAWYERX/perl-5.28.3/pod/perldelta.pod https://metacpan.org/pod/release/XSAWYERX/perl-5.30.3/pod/perldelta.pod
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2021:0343 https://access.redhat.com/errata/RHSA-2021:0343
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2020-10543
This issue has been addressed in the following products: Red Hat Enterprise Linux 7.6 Extended Update Support Via RHSA-2021:0883 https://access.redhat.com/errata/RHSA-2021:0883
This issue has been addressed in the following products: Red Hat Enterprise Linux 7.7 Extended Update Support Via RHSA-2021:1032 https://access.redhat.com/errata/RHSA-2021:1032
This issue has been addressed in the following products: Red Hat Enterprise Linux 7.4 Advanced Update Support Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions Red Hat Enterprise Linux 7.4 Telco Extended Update Support Via RHSA-2021:1266 https://access.redhat.com/errata/RHSA-2021:1266
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2021:1678 https://access.redhat.com/errata/RHSA-2021:1678
This issue has been addressed in the following products: Red Hat Enterprise Linux 8.2 Extended Update Support Via RHSA-2021:2792 https://access.redhat.com/errata/RHSA-2021:2792