Bug 742987 - CVE-2011-2728 perl: File::Glob bsd_glob() crash with certain glob flags
Summary: CVE-2011-2728 perl: File::Glob bsd_glob() crash with certain glob flags
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: http://perl5.git.perl.org/perl.git/co...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-03 14:05 UTC by Petr Pisar
Modified: 2011-11-25 02:08 UTC (History)
9 users (show)

Fixed In Version: perl-5.12.4-148.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-13 05:35:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix ported to Perl 5.12.4 (1.90 KB, patch)
2011-11-04 15:21 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 742236 0 low CLOSED CVE-2011-2728 perl: File::Glob bsd_glob() crash with certain glob flags 2021-02-24 14:37:42 UTC

Description Petr Pisar 2011-10-03 14:05:18 UTC
+++ This bug was initially created as a clone of Bug #742236 +++

An uninitialized pointer dereference flaw was found in the way bsd_glob() (FreeBSD glob(3) routine implementation) File::Glob Perl module implementation processed certain flags (GLOB_ALTDIRFUNC). A remote attacker, able to specify certain 'flags' argument to the Perl application, using the bsd_glob() routine, could use this flaw to cause denial of service of that application (perl executable crash).

References:
[1] http://cpansearch.perl.org/src/FLORA/perl-5.14.2/pod/perldelta.pod
[2] https://secunia.com/advisories/46172/
[3] https://bugs.gentoo.org/show_bug.cgi?id=384887

[...]

This issue affects the versions of the perl package, as shipped with Fedora release of 14 and 15.

--- Additional comment from jlieskov on 2011-09-29 13:37:48 GMT ---

Sample test script to demonstrate the issue:
============================================

$ cat test.pl
#!/usr/bin/perl -w

use File::Glob ':glob';

my @list = bsd_glob('*.[ch]', GLOB_ALTDIRFUNC);

============================================

And result of running it:

$ ./test.pl 
Segmentation fault (core dumped)

[...]

Upstream patch which fixed this issue:
http://perl5.git.perl.org/perl.git/commit/1af4051e077438976a4c12a0622feaf6715bec77

The crash is caused by the use of uninitialized function pointer. 

The Script author would control the flag parameter passed to the glob function
and it is unlikely that an untrusted input would directly be passed as flags to
bsd_glob().
-----

This issue has not been recognized as security bug by Red Hat security team. This issue will be fixed as regular bug.

All Fedoras affected.

Comment 1 Petr Pisar 2011-10-03 14:27:43 UTC
Fixed in F17 as perl-5.14.2-193.fc17.

Comment 2 Fedora Update System 2011-11-02 12:25:59 UTC
perl-5.14.2-189.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-5.14.2-189.fc16

Comment 3 Fedora Update System 2011-11-02 17:53:54 UTC
Package perl-5.14.2-189.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-189.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15276
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-11-03 21:52:36 UTC
Package perl-5.14.2-190.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-190.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15276
then log in and leave karma (feedback).

Comment 5 Petr Pisar 2011-11-04 15:21:31 UTC
Created attachment 531795 [details]
Fix ported to Perl 5.12.4

Comment 6 Fedora Update System 2011-11-04 15:41:21 UTC
perl-5.12.4-163.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/perl-5.12.4-163.fc15

Comment 7 Fedora Update System 2011-11-04 16:33:17 UTC
perl-5.12.4-148.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/perl-5.12.4-148.fc14

Comment 8 Fedora Update System 2011-11-13 05:35:50 UTC
perl-5.14.2-190.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-11-25 02:01:43 UTC
perl-5.12.4-163.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-11-25 02:08:45 UTC
perl-5.12.4-148.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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