From 576332adebf90cb37b5e2bcb4a335dd71592a75d Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 6 Jun 2025 17:59:51 +0800 Subject: [PATCH] fix CVE-2011-10007 (cherry picked from commit 524760279892acbdf0784f08c8088c43fa9a0237) --- CVE-2011-10007.patch | 22 ++++++++++++++++++++++ perl-File-Find-Rule.spec | 8 ++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 CVE-2011-10007.patch diff --git a/CVE-2011-10007.patch b/CVE-2011-10007.patch new file mode 100644 index 0000000..2c1d7bb --- /dev/null +++ b/CVE-2011-10007.patch @@ -0,0 +1,22 @@ +From df58128bcee4c1da78c34d7f3fe1357e575ad56f Mon Sep 17 00:00:00 2001 +From: Stig Palmquist +Date: Thu, 5 Jun 2025 12:58:45 +0200 +Subject: [PATCH] Fix for CVE-2011-10007: Use 3 arg open in grep()` + +--- + lib/File/Find/Rule.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/File/Find/Rule.pm b/lib/File/Find/Rule.pm +index feccc76..d4dc475 100644 +--- a/lib/File/Find/Rule.pm ++++ b/lib/File/Find/Rule.pm +@@ -420,7 +420,7 @@ sub grep { + + $self->exec( sub { + local *FILE; +- open FILE, $_ or return; ++ open FILE, '<', $_ or return; + local ($_, $.); + while () { + for my $p (@pattern) { diff --git a/perl-File-Find-Rule.spec b/perl-File-Find-Rule.spec index 7e76145..d7a5d76 100644 --- a/perl-File-Find-Rule.spec +++ b/perl-File-Find-Rule.spec @@ -1,12 +1,13 @@ %global _empty_manifest_terminate_build 0 Name: perl-File-Find-Rule Version: 0.34 -Release: 2 +Release: 3 Summary: Alternative interface to File::Find License: CHECK(Distributable) Group: Development/Libraries URL: http://search.cpan.org/dist/File-Find-Rule/ Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/File-Find-Rule-%{version}.tar.gz +Patch0: CVE-2011-10007.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) @@ -30,7 +31,7 @@ Provides: perl-File-Find-Rule-doc File::Find::Rule is a friendlier interface to File::Find. It allows you to build rules which specify the desired files and directories. %prep -%setup -q -n File-Find-Rule-%{version} +%autosetup -p1 -n File-Find-Rule-%{version} %build export PERL_MM_OPT="" %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -77,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/* %changelog +* Fri Jun 06 2025 Funda Wang - 0.34-3 +- fix CVE-2011-10007 + * Fri Jul 31 2020 shixuantong - 0.34-2 - Add tar package and Remove %{?dist} in release tag -- Gitee