[perl/f15] Fix code injection in Digest
Petr Pisar
ppisar at fedoraproject.org
Wed Oct 5 16:13:49 UTC 2011
commit f4e9b0fbc06febd58717ec0facbefd03ec04ede0
Author: Petr Písař <ppisar at redhat.com>
Date: Tue Oct 4 13:39:56 2011 +0200
Fix code injection in Digest
perl-5.14.2-digest_eval.patch | 28 ++++++++++++++++++++++++++++
perl.spec | 10 +++++++++-
2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/perl-5.14.2-digest_eval.patch b/perl-5.14.2-digest_eval.patch
new file mode 100644
index 0000000..dc7cc2d
--- /dev/null
+++ b/perl-5.14.2-digest_eval.patch
@@ -0,0 +1,28 @@
+From dbcab24bb98b4a243c8330bc7017c2080832b3f9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 4 Oct 2011 13:46:39 +0200
+Subject: [PATCH] Fix code injection in Digest
+
+See <https://bugzilla.redhat.com/show_bug.cgi?id=743010> for more details.
+---
+ cpan/Digest/Digest.pm | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/cpan/Digest/Digest.pm b/cpan/Digest/Digest.pm
+index 384dfc8..4b923ae 100644
+--- a/cpan/Digest/Digest.pm
++++ b/cpan/Digest/Digest.pm
+@@ -35,7 +35,9 @@ sub new
+ ($class, @args) = @$class if ref($class);
+ no strict 'refs';
+ unless (exists ${"$class\::"}{"VERSION"}) {
+- eval "require $class";
++ my $pm_file = $class . ".pm";
++ $pm_file =~ s{::}{/}g;
++ eval { require $pm_file };
+ if ($@) {
+ $err ||= $@;
+ next;
+--
+1.7.6.4
+
diff --git a/perl.spec b/perl.spec
index debc9ec..622b95f 100644
--- a/perl.spec
+++ b/perl.spec
@@ -20,7 +20,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, becase dual-lived modules will be broken otherwise
-Release: 161%{?dist}
+Release: 162%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -80,6 +80,9 @@ Patch9: perl-5.12.2-h2ph.patch
# Update ExtUtils::ParseXS to 2.2206
Patch10: perl-ExtUtils-ParseXS-2.2206.patch
+# Fix code injection in Digest, rhbz #743010, RT#71390, fixed in Digest-1.17.
+Patch11: perl-5.14.2-digest_eval.patch
+
# Update some of the bundled modules
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
@@ -955,6 +958,7 @@ tarball from perl.org.
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
#copy the example script
cp -a %{SOURCE5} .
@@ -1167,6 +1171,7 @@ pushd %{build_archlib}/CORE/
'Fedora Patch8: Do not leak when destroying thread; RT #77352' \
'Fedora Patch9: h2ph produces incorrect code in preamble, based mainly on RT #74614 ' \
'Fedora Patch10: Update ExtUtils::ParseXS to 2.2206' \
+ 'Fedora Patch11: Fix code injection in Digest->new()' \
%{nil}
rm patchlevel.bak
@@ -1968,6 +1973,9 @@ rm -rf $RPM_BUILD_ROOT
# Old changelog entries are preserved in CVS.
%changelog
+* Wed Oct 05 2011 Petr Pisar <ppisar at redhat.com> - 4:5.12.4-161
+- Fix CVE-2011-3597 (code injection in Digest) (bug #743010)
+
* Sun Aug 14 2011 Iain Arnell <iarnell at gmail.com> 4:5.12.4-161
- perl needs to own vendorarch/auto directory
- fix version number in last two changelog entries
More information about the scm-commits
mailing list