Bug 1547772 (CVE-2018-6913)

Summary: CVE-2018-6913 perl: heap buffer overflow in pp_pack.c
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: alexl, caillon+fedoraproject, hhorak, iarnell, jorton, jplesnik, kasal, mmaslano, perl-devel, perl-maint-list, ppisar, psabata, rhughes, sandmann, security-response-team, tcallawa
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: perl 5.26.2, perl 5.24.4 Doc Type: If docs needed, set a value
Doc Text:
It was found that the pack() function in the 32-bit version of the perl interpreter was vulnerable to heap buffer overflow via the packing template. An attacker, able to provide a specially crafted template, could use this flaw to crash the interpreter.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-16 08:39:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1567776    
Bug Blocks: 1547784    

Description Laura Pardo 2018-02-21 22:31:51 UTC
A flaw was found in Perl 5. Vulnerable code in pp_pack.c file accepts either large blocks of data from untrusted sources and/or duplicates such blocks, which allows an attacker to exploit this vulnerability at runtime by supplying malicious crafted data. This could result in a denial-of-service (DoS) attack.

Comment 3 Petr Pisar 2018-02-22 13:31:10 UTC
Reproducer for 32-bit architecture:

$ perl -e 'pack "c10f1073741823"'
Segmentation fault (core dumped)

Comment 6 Petr Pisar 2018-03-26 10:26:47 UTC
Perl 5 Porters published the fix for Perl 5.26.1 at <https://perl5.git.perl.org/perl.git/commit/0fcf83230df5f8c52602ae22fde57c7ea885534d> and in Perl-5.26.2-RC1 and 5.24.4-RC1 tar balls.

Comment 10 Cedric Buissart 2018-04-16 08:06:19 UTC
Created perl tracking bugs for this issue:

Affects: fedora-all [bug 1567776]

Comment 11 Cedric Buissart 2018-04-16 08:52:03 UTC
Upstream fix:
- (perl #131844) fix various space calculation issues in pp_pack.c
https://perl5.git.perl.org/perl.git/commit/f17fed5006177dce8ac48229c424a2da0d6ba492

Comment 12 Cedric Buissart 2018-04-16 09:17:07 UTC
External References:

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

Comment 15 Cedric Buissart 2018-04-16 11:16:14 UTC
Statement:

The 64-bit versions of perl have not been found to be affected. As a result, this issue did not affect the versions of perl as shipped with Red Hat Enterprise Linux 7, and the versions of  rh-perl526-perl,  rh-perl524-perl and  rh-perl520-perl as shipped with Red Hat Software Collections.

This issue affects the 32bit versions of perl as shipped with Red Hat Enterprise Linux 6. Red Hat Enterprise Linux 6 is now in Maintenance Support 2 Phase of the support and maintenance life cycle. This has been rated as having a security impact of Low, and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

This issue may affect the versions of perl as shipped with Red Hat Enterprise Linux 5. Red Hat Enterprise Linux 5 is now in Extended Life Cycle phase of the support and maintenance life cycle. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

Comment 19 Cedric Buissart 2018-04-18 14:30:15 UTC
Acknowledgments:

Name: Perl 5 Porters
Upstream: GwanYeong Kim