From 1961d1436952a4ad86273607b96fa6f4773050c3 Mon Sep 17 00:00:00 2001 From: zhuhongbo Date: Thu, 10 Jul 2025 11:08:41 +0800 Subject: [PATCH] fix cve CVE-2011-10007 --- 0001-fix-cve-CVE-2011-10007.patch | 25 +++++++++++++++++++++++++ perl-File-Find-Rule.spec | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0001-fix-cve-CVE-2011-10007.patch diff --git a/0001-fix-cve-CVE-2011-10007.patch b/0001-fix-cve-CVE-2011-10007.patch new file mode 100644 index 0000000..e13d00b --- /dev/null +++ b/0001-fix-cve-CVE-2011-10007.patch @@ -0,0 +1,25 @@ +From b0287b2e8a3e73a62760f6fdf32895794689417e Mon Sep 17 00:00:00 2001 +From: zhuhongbo +Date: Thu, 10 Jul 2025 11:02:36 +0800 +Subject: [PATCH] fix cve CVE-2011-10007 + +--- + 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 93a21b9..e6c00e5 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) { +-- +2.39.3 + diff --git a/perl-File-Find-Rule.spec b/perl-File-Find-Rule.spec index faa1e81..c273731 100644 --- a/perl-File-Find-Rule.spec +++ b/perl-File-Find-Rule.spec @@ -1,11 +1,12 @@ Name: perl-File-Find-Rule Version: 0.33 -Release: 5%{?dist} +Release: 5%{?dist}.1 Summary: Perl module implementing an alternative interface to File::Find License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/File-Find-Rule/ Source0: http://www.cpan.org/modules/by-module/File/File-Find-Rule-%{version}.tar.gz +Patch0: 0001-fix-cve-CVE-2011-10007.patch BuildArch: noarch BuildRequires: perl @@ -30,6 +31,7 @@ you to build rules which specify the desired files and directories. %prep %setup -q -n File-Find-Rule-%{version} +%patch -P0 -p1 %build perl Makefile.PL INSTALLDIRS=vendor @@ -51,6 +53,9 @@ make test %{_mandir}/man3/* %changelog +* Thu Jul 10 2025 zhuhongbo - 0.33-5.1 +- fix: fix cve CVE-2011-10007 + * Fri Dec 27 2013 Daniel Mach - 0.33-5 - Mass rebuild 2013-12-27 -- Gitee