From 077a6eb385f72460288422f4ac3259a59cc3f758 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 6 Jun 2025 17:57:21 +0800 Subject: [PATCH] fix CVE-2011-10007 (cherry picked from commit a556ea1d8105f7e5a47291e4bca6b369b084a15d) --- 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 87c7602..582e2cd 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: 3 +Release: 4 Summary: Alternative interface to File::Find License: GPL-1.0-or-later or Artistic-1.0 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-4 +- fix CVE-2011-10007 + * Mon Jul 18 2022 Chenyx - 0.34-3 - License compliance rectification -- Gitee