Bug 1187149 (CVE-2013-7422) - CVE-2013-7422 perl: segmentation fault in S_regmatch on negative backreference
Summary: CVE-2013-7422 perl: segmentation fault in S_regmatch on negative backreference
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2013-7422
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1187151
Blocks: 1187150
TreeView+ depends on / blocked
 
Reported: 2015-01-29 12:27 UTC by Martin Prpič
Modified: 2021-02-17 05:41 UTC (History)
15 users (show)

Fixed In Version: perl 5.19.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-16 13:58:54 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 776046 0 None None None Never

Description Martin Prpič 2015-01-29 12:27:31 UTC
An integer underflow flaw was discovered in the way Perl parsed regular expression backreferences. An attacker able to supply a crafted regular expression to a Perl application could possibly use this flaw to crash that application.

Reproducer:

$ perl -e '/\7777777777/'
Segmentation fault

Upstream issue:

https://rt.perl.org/Public/Bug/Display.html?id=119505

Upstream patch:

http://perl5.git.perl.org/perl.git/commitdiff/0c2990d652e985784f095bba4bc356481a66aa06

Comment 1 Martin Prpič 2015-01-29 12:29:09 UTC
Created perl tracking bugs for this issue:

Affects: fedora-all [bug 1187151]

Comment 3 Stefan Cornelius 2015-03-05 13:15:41 UTC
The code responsible for processing regular expression backreferences in regcomp.c did not properly handle large digit strings. An attacker able to pass specially crafted regular expressions containing large backreferences can exploit this issue to e.g. cause an application crash due to an out-of-bounds read caused by an array indexing error in the S_regmatch() function.

It's possible that this flaw may not affect 32bit platforms.

SUSE has previously fixed this via http://marc.info/?l=opensuse-commit&m=121933719424130, although this patch is different from the one used Perl upstream.

OSS post assigning the CVE:
http://www.openwall.com/lists/oss-security/2015/01/27/3

Comment 4 Vasyl Kaigorodov 2015-03-16 12:54:16 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.


Note You need to log in before you can comment on or make changes to this bug.