ppisar pushed to perl (f25). "Fix crash in "evalbytes S""
by notifications@fedoraproject.org
From 3f386ca0c4d07d6ffed4672c6b9fab46c63eeac4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 09:16:29 +0100
Subject: Fix crash in "evalbytes S"
---
perl-5.24.0-Regression-test-for-RT-129196.patch | 45 +++++++++++++++++++++
...rl-129196-Crash-bad-read-with-evalbytes-S.patch | 37 +++++++++++++++++
perl-5.25.4-toke.c-fix-mswin32-builds.patch | 46 ++++++++++++++++++++++
perl.spec | 16 +++++++-
4 files changed, 143 insertions(+), 1 deletion(-)
create mode 100644 perl-5.24.0-Regression-test-for-RT-129196.patch
create mode 100644 perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
create mode 100644 perl-5.25.4-toke.c-fix-mswin32-builds.patch
diff --git a/perl-5.24.0-Regression-test-for-RT-129196.patch b/perl-5.24.0-Regression-test-for-RT-129196.patch
new file mode 100644
index 0000000..23beb36
--- /dev/null
+++ b/perl-5.24.0-Regression-test-for-RT-129196.patch
@@ -0,0 +1,45 @@
+From a51d828a6d402f30f37707c714de218f6b47dbd8 Mon Sep 17 00:00:00 2001
+From: Dan Collins <dcollinsn(a)gmail.com>
+Date: Sun, 4 Sep 2016 14:43:41 -0400
+Subject: [PATCH] Regression test for RT #129196
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported to 5.24.0:
+
+commit a6128716d2cc20147851e0a37768376647bd3242
+Author: Dan Collins <dcollinsn(a)gmail.com>
+Date: Sun Sep 4 14:43:41 2016 -0400
+
+ Regression test for RT #129196
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ t/op/evalbytes.t | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/t/op/evalbytes.t b/t/op/evalbytes.t
+index cca7c04..5e2af76 100644
+--- a/t/op/evalbytes.t
++++ b/t/op/evalbytes.t
+@@ -6,7 +6,7 @@ BEGIN {
+ require './test.pl'; require './charset_tools.pl';
+ }
+
+-plan(tests => 8);
++plan(tests => 9);
+
+ {
+ local $SIG{__WARN__} = sub {};
+@@ -33,3 +33,7 @@ chop($upcode = "use utf8; $U_100" . chr 256);
+ is evalbytes $upcode, chr 256, 'use utf8 within evalbytes on utf8 string';
+ eval { evalbytes chr 256 };
+ like $@, qr/Wide character/, 'evalbytes croaks on non-bytes';
++
++eval 'evalbytes S';
++ok 1, '[RT #129196] evalbytes S should not segfault';
++
+--
+2.7.4
+
diff --git a/perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch b/perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
new file mode 100644
index 0000000..e224f30
--- /dev/null
+++ b/perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
@@ -0,0 +1,37 @@
+From 9bde56224e82f20e7a65b3469b1ffb6b9f6d4df8 Mon Sep 17 00:00:00 2001
+From: Father Chrysostomos <sprout(a)cpan.org>
+Date: Sun, 4 Sep 2016 20:24:19 -0700
+Subject: [PATCH] =?UTF-8?q?[perl=20#129196]=20Crash/bad=20read=20with=20?=
+ =?UTF-8?q?=E2=80=98evalbytes=20S=E2=80=99?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+5dc13276 added some code to toke.c that did not take into account
+that the opnum (‘f’) argument to UNI* could be a negated op number.
+PL_last_lop_op must never be negative, since it is used as an offset
+into a struct.
+
+Tests for the crash will come in the next commit.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ toke.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toke.c b/toke.c
+index 2fe8b69..2350703 100644
+--- a/toke.c
++++ b/toke.c
+@@ -241,7 +241,7 @@ static const char* const lex_state_names[] = {
+ if (have_x) PL_expect = x; \
+ PL_bufptr = s; \
+ PL_last_uni = PL_oldbufptr; \
+- PL_last_lop_op = f; \
++ PL_last_lop_op = f < 0 ? -f : f; \
+ if (*s == '(') \
+ return REPORT( (int)FUNC1 ); \
+ s = skipspace(s); \
+--
+2.7.4
+
diff --git a/perl-5.25.4-toke.c-fix-mswin32-builds.patch b/perl-5.25.4-toke.c-fix-mswin32-builds.patch
new file mode 100644
index 0000000..5b066c8
--- /dev/null
+++ b/perl-5.25.4-toke.c-fix-mswin32-builds.patch
@@ -0,0 +1,46 @@
+From 0af40c757f083cc12988effb46da5313cd042f00 Mon Sep 17 00:00:00 2001
+From: David Mitchell <davem(a)iabyn.com>
+Date: Mon, 5 Sep 2016 15:49:28 +0100
+Subject: [PATCH] toke.c: fix mswin32 builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+9bde56224 added this as part of macro:
+
+- PL_last_lop_op = f; \
++ PL_last_lop_op = f < 0 ? -f : f; \
+
+which broke win32 builds due to this
+
+ UNIBRACK(-OP_ENTEREVAL)
+
+expanding to
+
+ PL_last_lop_op = -345 < 0 ? --345 : -345
+
+and the -- being seen as a pre-dec op.
+
+Diagnosed by Dagfinn Ilmari Mannsåker.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ toke.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toke.c b/toke.c
+index 2350703..a1cdda8 100644
+--- a/toke.c
++++ b/toke.c
+@@ -241,7 +241,7 @@ static const char* const lex_state_names[] = {
+ if (have_x) PL_expect = x; \
+ PL_bufptr = s; \
+ PL_last_uni = PL_oldbufptr; \
+- PL_last_lop_op = f < 0 ? -f : f; \
++ PL_last_lop_op = (f) < 0 ? -(f) : (f); \
+ if (*s == '(') \
+ return REPORT( (int)FUNC1 ); \
+ s = skipspace(s); \
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index d1e5563..88d11b8 100644
--- a/perl.spec
+++ b/perl.spec
@@ -28,7 +28,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
-Release: 377%{?dist}
+Release: 378%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -183,6 +183,11 @@ Patch43: perl-5.24.0-PATCH-perl-128734-tr-N-.-failing-for-128-255.patch
# in upstream after 5.24.1
Patch44: perl-5.24.0-CVE-2016-1238-maint-5.24-dot-in-inc.patch
+# Fix crash in "evalbytes S", RT#129196, in upstream after 5.25.4
+Patch45: perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
+Patch46: perl-5.24.0-Regression-test-for-RT-129196.patch
+Patch47: perl-5.25.4-toke.c-fix-mswin32-builds.patch
+
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2848,6 +2853,9 @@ Perl extension for Version Objects
%patch42 -p1
%patch43 -p1
%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
%patch200 -p1
%patch201 -p1
@@ -2883,6 +2891,9 @@ perl -x patchlevel.h \
'Fedora Patch42: Fix a crash in lexical scope warnings (RT#128597)' \
'Fedora Patch43: Fix handling \N{} in tr for characters in range 128--255 (RT#128734)' \
'Fedora Patch44: Avoid loading of modules from current directory (CVE-2016-1238)' \
+ 'Fedora Patch45: Fix crash in "evalbytes S" (RT#129196)' \
+ 'Fedora Patch46: Fix crash in "evalbytes S" (RT#129196)' \
+ 'Fedora Patch47: Fix crash in "evalbytes S" (RT#129196)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5161,6 +5172,9 @@ popd
# Old changelog entries are preserved in CVS.
%changelog
+* Thu Nov 03 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
+- Fix crash in "evalbytes S" (RT#129196)
+
* Tue Aug 02 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 4:5.24.0-377
- Avoid loading of modules from current directory, CVE-2016-1238, (bug #1360425)
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=f25&id=3f386ca0c4d0...
7 years, 7 months
ppisar pushed to perl (f25). "Add Artistic 2.0 into perl-Encode
license tag because of encguess tool"
by notifications@fedoraproject.org
From e74c79cfe271534fbf7c7fdd7cbb8c313da42a76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Fri, 16 Sep 2016 11:07:32 +0200
Subject: Add Artistic 2.0 into perl-Encode license tag because of encguess
tool
---
perl.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/perl.spec b/perl.spec
index dfdcc54..f112d3f 100644
--- a/perl.spec
+++ b/perl.spec
@@ -36,6 +36,7 @@ Group: Development/Languages
# subpackages.
# dist/Tie-File/lib/Tie/File.pm: GPLv2+ or Artistic
# cpan/Getopt-Long/lib/Getopt/Long.pm: GPLv2+ or Artistic
+# cpan/Encode/bin/encguess: Artistic 2.0
# lib/unicore: UCD
# ext/SDBM_File/sdbm.{c,h}: Public domain
# regexec.c, regcomp.c: HSLR
@@ -987,7 +988,7 @@ module can handle all types of input, including partial-byte data.
%package Encode
Summary: Character encodings in Perl
Group: Development/Libraries
-License: (GPL+ or Artistic) and UCD
+License: (GPL+ or Artistic) and Artistic 2.0 and UCD
Epoch: 4
Version: 2.80
Requires: %perl_compat
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=f25&id=e74c79cfe271...
7 years, 7 months
ppisar pushed to perl (f25). "perl-podlators license corrected to
(GPL+ or Artistic) and MIT (..more)"
by notifications@fedoraproject.org
From 59e2e9eca9322873fa237a9fccc7906680c28476 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Tue, 20 Sep 2016 14:00:49 +0200
Subject: perl-podlators license corrected to (GPL+ or Artistic) and MIT
podlators.pod file has MIT licesne.
---
perl.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/perl.spec b/perl.spec
index eaa974e..3f42f26 100644
--- a/perl.spec
+++ b/perl.spec
@@ -42,6 +42,7 @@ Group: Development/Languages
# ext/SDBM_File/sdbm.{c,h}: Public domain
# regexec.c, regcomp.c: HSLR
# time64.c: MIT
+# pod/perlpodstyle.pod: MIT
# pod/perlunicook.pod: (GPL+ or Artistic) and Public Domain
# pod/perlgpl.pod: GPL text
# pod/perlartistic.pod: Artistic text
@@ -2337,7 +2338,7 @@ verbose level is 2, then the entire manual page is printed.
%package podlators
Summary: Format POD source into various output formats
Group: Development/Libraries
-License: GPL+ or Artistic
+License: (GPL+ or Artistic) and MIT
Epoch: 0
Version: 4.07
BuildArch: noarch
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=f25&id=59e2e9eca932...
7 years, 7 months
ppisar pushed to perl (f25). "perl-Unicode-Collate license corrected
to ((GPL+ or Artistic) and Unicode) (..more)"
by notifications@fedoraproject.org
From 42e17ea67fd8847cbbe239a200e60c953297446e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Mon, 19 Sep 2016 16:16:29 +0200
Subject: perl-Unicode-Collate license corrected to ((GPL+ or Artistic) and
Unicode)
The file links to <http://www.unicode.org/terms_of_use.html> that
mathcces "Unicode" license (except the (c) paragraph).
---
perl.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/perl.spec b/perl.spec
index f112d3f..eaa974e 100644
--- a/perl.spec
+++ b/perl.spec
@@ -37,6 +37,7 @@ Group: Development/Languages
# dist/Tie-File/lib/Tie/File.pm: GPLv2+ or Artistic
# cpan/Getopt-Long/lib/Getopt/Long.pm: GPLv2+ or Artistic
# cpan/Encode/bin/encguess: Artistic 2.0
+# cpan/Unicode-Collate/Collate/allkeys.txt: Unicode
# lib/unicore: UCD
# ext/SDBM_File/sdbm.{c,h}: Public domain
# regexec.c, regcomp.c: HSLR
@@ -2746,7 +2747,7 @@ hashes and hash refs.
%package Unicode-Collate
Summary: Unicode Collation Algorithm
Group: Development/Libraries
-License: (GPL+ or Artistic) and UCD
+License: (GPL+ or Artistic) and Unicode
Epoch: 0
Version: 1.14
Requires: %perl_compat
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=f25&id=42e17ea67fd8...
7 years, 7 months
ppisar pushed to perl (master). "Fix stack handling when calling
chdir without an argument"
by notifications@fedoraproject.org
From 97b9d9c09202cda29036f2864b3785ec45950181 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 14:58:16 +0100
Subject: Fix stack handling when calling chdir without an argument
---
...30-make-chdir-allocate-the-stack-it-needs.patch | 66 ++++++++++++++++++++++
perl.spec | 6 ++
2 files changed, 72 insertions(+)
create mode 100644 perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch
diff --git a/perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch b/perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch
new file mode 100644
index 0000000..c3b723a
--- /dev/null
+++ b/perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch
@@ -0,0 +1,66 @@
+From d47812b974b515e952dc093e692bf15f0a9afbc4 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony(a)develop-help.com>
+Date: Mon, 5 Sep 2016 15:40:11 +1000
+Subject: [PATCH] (perl #129130) make chdir allocate the stack it needs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported to 5.24.0:
+
+commit 92c843fb4b4e1a1e0ac7ec0fe198dc77266838da
+Author: Tony Cook <tony(a)develop-help.com>
+Date: Mon Sep 5 15:40:11 2016 +1000
+
+ (perl #129130) make chdir allocate the stack it needs
+
+ chdir with no argument didn't ensure there was stack space available
+ for its result.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ pp_sys.c | 1 +
+ t/op/chdir.t | 8 +++++++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/pp_sys.c b/pp_sys.c
+index 3bf2673..d2cf872 100644
+--- a/pp_sys.c
++++ b/pp_sys.c
+@@ -3639,6 +3639,7 @@ PP(pp_chdir)
+ HV * const table = GvHVn(PL_envgv);
+ SV **svp;
+
++ EXTEND(SP, 1);
+ if ( (svp = hv_fetchs(table, "HOME", FALSE))
+ || (svp = hv_fetchs(table, "LOGDIR", FALSE))
+ #ifdef VMS
+diff --git a/t/op/chdir.t b/t/op/chdir.t
+index a5ea76a..685e556 100644
+--- a/t/op/chdir.t
++++ b/t/op/chdir.t
+@@ -10,7 +10,7 @@ BEGIN {
+ # possibilities into @INC.
+ unshift @INC, qw(t . lib ../lib);
+ require "test.pl";
+- plan(tests => 47);
++ plan(tests => 48);
+ }
+
+ use Config;
+@@ -161,6 +161,12 @@ sub check_env {
+ }
+ }
+
++fresh_perl_is(<<'EOP', '', { stderr => 1 }, "check stack handling");
++for $x (map $_+1, 1 .. 100) {
++ map chdir, 1 .. $x;
++}
++EOP
++
+ my %Saved_Env = ();
+ sub clean_env {
+ foreach my $env (@magic_envs) {
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index dddd247..49e4cba 100644
--- a/perl.spec
+++ b/perl.spec
@@ -215,6 +215,9 @@ Patch56: perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under
# RT#130001, in upstream after 5.25.6
Patch57: perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
+# Fix stack handling when calling chdir without an argument, RT#129130
+Patch58: perl-5.24.0-perl-129130-make-chdir-allocate-the-stack-it-needs.patch
+
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2895,6 +2898,7 @@ Perl extension for Version Objects
%patch55 -p1
%patch56 -p1
%patch57 -p1
+%patch58 -p1
%patch200 -p1
%patch201 -p1
@@ -2943,6 +2947,7 @@ perl -x patchlevel.h \
'Fedora Patch55: Fix parsing perl options in shell bang line (RT#129336)' \
'Fedora Patch56: Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)' \
'Fedora Patch57: Avoid infinite loop in h2xs tool if enum and type have the same name (RT130001)' \
+ 'Fedora Patch58: Fix stack handling when calling chdir without an argument (RT#129130)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5230,6 +5235,7 @@ popd
- Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)
- Avoid infinite loop in h2xs tool if enum and type have the same name
(RT130001)
+- Fix stack handling when calling chdir without an argument (RT#129130)
* Fri Sep 02 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
- perl-core depends on Parse::CPAN::Meta module instead of package name to allow
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=97b9d9c09...
7 years, 7 months
ppisar pushed to perl (master). "Avoid infinite loop in h2xs tool if
enum and type have the same name"
by notifications@fedoraproject.org
From 62440eed42d76654547478295cec2440617a2410 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 14:49:51 +0100
Subject: Avoid infinite loop in h2xs tool if enum and type have the same name
---
...130001-h2xs-avoid-infinite-loop-for-enums.patch | 32 ++++++++++++++++++++++
perl.spec | 8 ++++++
2 files changed, 40 insertions(+)
create mode 100644 perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
diff --git a/perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch b/perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
new file mode 100644
index 0000000..9b4f197
--- /dev/null
+++ b/perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
@@ -0,0 +1,32 @@
+From 9ce5bf4c39e28441410672f39b5ee1c4569967f8 Mon Sep 17 00:00:00 2001
+From: Hugo van der Sanden <hv(a)crypt.org>
+Date: Fri, 28 Oct 2016 13:27:23 +0100
+Subject: [PATCH] [perl #130001] h2xs: avoid infinite loop for enums
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+'typedef enum x { ... } x' causes h2xs to enter a substitution loop while
+trying to write the typemap file.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ utils/h2xs.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/h2xs.PL b/utils/h2xs.PL
+index 8fda87b..f9063cb 100644
+--- a/utils/h2xs.PL
++++ b/utils/h2xs.PL
+@@ -1034,7 +1034,7 @@ if( ! $opt_X ){ # use XS, unless it was disabled
+ }
+ }
+ { local $" = '|';
+- $typedef_rex = qr(\b(?<!struct )(?:@good_td)\b) if @good_td;
++ $typedef_rex = qr(\b(?<!struct )(?<!enum )(?:@good_td)\b) if @good_td;
+ }
+ %known_fnames = map @$_[1,3], @$fdecls_parsed; # [1,3] is NAME, FULLTEXT
+ if ($fmask) {
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index 42c36de..dddd247 100644
--- a/perl.spec
+++ b/perl.spec
@@ -211,6 +211,10 @@ Patch55: perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patc
# in upstream after 5.25.6
Patch56: perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch
+# Avoid infinite loop in h2xs tool if enum and type have the same name,
+# RT#130001, in upstream after 5.25.6
+Patch57: perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch
+
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2890,6 +2894,7 @@ Perl extension for Version Objects
%patch54 -p1
%patch55 -p1
%patch56 -p1
+%patch57 -p1
%patch200 -p1
%patch201 -p1
@@ -2937,6 +2942,7 @@ perl -x patchlevel.h \
'Fedora Patch54: Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)' \
'Fedora Patch55: Fix parsing perl options in shell bang line (RT#129336)' \
'Fedora Patch56: Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)' \
+ 'Fedora Patch57: Avoid infinite loop in h2xs tool if enum and type have the same name (RT130001)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5222,6 +5228,8 @@ popd
- Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)
- Fix parsing perl options in shell bang line (RT#129336)
- Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)
+- Avoid infinite loop in h2xs tool if enum and type have the same name
+ (RT130001)
* Fri Sep 02 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
- perl-core depends on Parse::CPAN::Meta module instead of package name to allow
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=62440eed4...
7 years, 7 months
ppisar pushed to perl (master). "Fix firstchar bitmap under UTF-8
with prefix optimization"
by notifications@fedoraproject.org
From 281d2faaadfab697923a8bd0a3d9fe28194385e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 13:33:10 +0100
Subject: Fix firstchar bitmap under UTF-8 with prefix optimization
---
...ix-perl-129950-fix-firstchar-bitmap-under.patch | 97 ++++++++++++++++++++++
perl.spec | 8 ++
2 files changed, 105 insertions(+)
create mode 100644 perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch
diff --git a/perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch b/perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch
new file mode 100644
index 0000000..82eeea6
--- /dev/null
+++ b/perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch
@@ -0,0 +1,97 @@
+From 1b90dad20879f0e7a3eced5da0e0aacda93708ed Mon Sep 17 00:00:00 2001
+From: Yves Orton <demerphq(a)gmail.com>
+Date: Thu, 27 Oct 2016 13:52:24 +0200
+Subject: [PATCH] regcomp.c: fix perl #129950 - fix firstchar bitmap under utf8
+ with prefix optimisation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported to 5.24.0:
+
+commit da42332b10691ba7af7550035ffc7f46c87e4e66
+Author: Yves Orton <demerphq(a)gmail.com>
+Date: Thu Oct 27 13:52:24 2016 +0200
+
+ regcomp.c: fix perl #129950 - fix firstchar bitmap under utf8 with prefix optimisation
+
+ The trie code contains a number of sub optimisations, one of which
+ extracts common prefixes from alternations, and another which isa
+ bitmap of the possible matching first chars.
+
+ The bitmap needs to contain the possible first octets of the string
+ which the trie can match, and for codepoints which might have a different
+ first octet under utf8 or non-utf8 need to register BOTH codepoints.
+
+ So for instance in the pattern (?:a|a\x{E4}) we should restructure this
+ as a(|\x{E4), and the bitmap for the trie should contain both \x{E4} AND
+ \x{C3} as \x{C3} is the first byte of \x{EF} expressed as utf8.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ regcomp.c | 14 ++++++++++++++
+ t/re/pat.t | 9 ++++++++-
+ 2 files changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/regcomp.c b/regcomp.c
+index 7462885..bcb8db5 100644
+--- a/regcomp.c
++++ b/regcomp.c
+@@ -3272,6 +3272,13 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
+ TRIE_BITMAP_SET(trie,*ch);
+ if ( folder )
+ TRIE_BITMAP_SET(trie, folder[ *ch ]);
++ if ( !UTF ) {
++ /* store first byte of utf8 representation of
++ variant codepoints */
++ if (! UVCHR_IS_INVARIANT(*ch)) {
++ TRIE_BITMAP_SET(trie, UTF8_TWO_BYTE_HI(*ch));
++ }
++ }
+ DEBUG_OPTIMISE_r(
+ Perl_re_printf( aTHX_ "%s", (char*)ch)
+ );
+@@ -3280,6 +3287,13 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
+ TRIE_BITMAP_SET(trie,*ch);
+ if ( folder )
+ TRIE_BITMAP_SET(trie,folder[ *ch ]);
++ if ( !UTF ) {
++ /* store first byte of utf8 representation of
++ variant codepoints */
++ if (! UVCHR_IS_INVARIANT(*ch)) {
++ TRIE_BITMAP_SET(trie, UTF8_TWO_BYTE_HI(*ch));
++ }
++ }
+ DEBUG_OPTIMISE_r(Perl_re_printf( aTHX_ "%s", ch));
+ }
+ idx = ofs;
+diff --git a/t/re/pat.t b/t/re/pat.t
+index 295a9f7..4aa77cf 100644
+--- a/t/re/pat.t
++++ b/t/re/pat.t
+@@ -23,7 +23,7 @@ BEGIN {
+ skip_all_without_unicode_tables();
+ }
+
+-plan tests => 789; # Update this when adding/deleting tests.
++plan tests => 791; # Update this when adding/deleting tests.
+
+ run_tests() unless caller;
+
+@@ -1758,6 +1758,13 @@ EOP
+ fresh_perl_is($code, $expect, {}, "$bug - $test_name" );
+ }
+ }
++
++ {
++ my $str = "a\xE4";
++ ok( $str =~ m{^(a|a\x{e4})$}, "fix [perl #129950] - latin1 case" );
++ utf8::upgrade($str);
++ ok( $str =~ m{^(a|a\x{e4})$}, "fix [perl #129950] - utf8 case" );
++ }
+ } # End of sub run_tests
+
+ 1;
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index 0893966..42c36de 100644
--- a/perl.spec
+++ b/perl.spec
@@ -206,6 +206,11 @@ Patch54: perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf
# Fix parsing perl options in shell bang line, RT#129336,
# in upstream after 5.25.5
Patch55: perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patch
+
+# Fix firstchar bitmap under UTF-8 with prefix optimization, RT#129950,
+# in upstream after 5.25.6
+Patch56: perl-5.24.0-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch
+
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2884,6 +2889,7 @@ Perl extension for Version Objects
%patch53 -p1
%patch54 -p1
%patch55 -p1
+%patch56 -p1
%patch200 -p1
%patch201 -p1
@@ -2930,6 +2936,7 @@ perl -x patchlevel.h \
'Fedora Patch53: Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)' \
'Fedora Patch54: Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)' \
'Fedora Patch55: Fix parsing perl options in shell bang line (RT#129336)' \
+ 'Fedora Patch56: Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5214,6 +5221,7 @@ popd
- Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)
- Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)
- Fix parsing perl options in shell bang line (RT#129336)
+- Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)
* Fri Sep 02 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
- perl-core depends on Parse::CPAN::Meta module instead of package name to allow
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=281d2faaa...
7 years, 7 months
ppisar pushed to perl (master). "Fix parsing perl options in shell
bang line"
by notifications@fedoraproject.org
From dee7e92b27fecde226e0a4446bdfeef20778620b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 13:11:14 +0100
Subject: Fix parsing perl options in shell bang line
---
...336-perl-i-u-erroneously-interpreted-as-u.patch | 92 ++++++++++++++++++++++
perl.spec | 6 ++
2 files changed, 98 insertions(+)
create mode 100644 perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patch
diff --git a/perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patch b/perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patch
new file mode 100644
index 0000000..7039076
--- /dev/null
+++ b/perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patch
@@ -0,0 +1,92 @@
+From 03fcc0c44bc7972f2c92736daae5b63d601b7c49 Mon Sep 17 00:00:00 2001
+From: Dan Collins <dcollinsn(a)gmail.com>
+Date: Fri, 23 Sep 2016 01:21:20 -0400
+Subject: [PATCH] [rt #129336] #!perl -i u erroneously interpreted as -u
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported to 5.24.0:
+
+commit f54cfdacff1f3744ef08fc70f1f3bc6c7d862e83
+Author: Dan Collins <dcollinsn(a)gmail.com>
+Date: Fri Sep 23 01:21:20 2016 -0400
+
+ [rt #129336] #!perl -i u erroneously interpreted as -u
+
+ Perl_moreswitches processes a single switch, and returns a pointer
+ to the start of the next switch. It can return either
+ the a pointer to the next flag itself:
+
+ #!perl -n -p
+ ^ Can point here
+
+ Or, to the space before the next "arg":
+
+ #!perl -n -p
+ ^ Can point here
+
+ (Where the next call to Perl_moreswitches will consume " -".)
+
+ In the case of -i[extension], the pointer is by default pointing at
+ the space after the end of the argument. The current code tries to
+ do the former, by unconditionally advancing the pointer, and then
+ advancing it again if it is on a '-'. But that is incorrect:
+
+ #!perl -i p
+ ^ Will point here, but that isn't a flag
+
+ I could fix this by removing the unconditional s++, and having it
+ increment by 2 if *(s+1)=='-', but this work isn't actually
+ necessary - it's better to just leave it pointing at the space after
+ the argument.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ perl.c | 5 -----
+ t/op/lex.t | 9 ++++++++-
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/perl.c b/perl.c
+index 228a0d8..5cc7d0b 100644
+--- a/perl.c
++++ b/perl.c
+@@ -3306,11 +3306,6 @@ Perl_moreswitches(pTHX_ const char *s)
+
+ PL_inplace = savepvn(start, s - start);
+ }
+- if (*s) {
+- ++s;
+- if (*s == '-') /* Additional switches on #! line. */
+- s++;
+- }
+ return s;
+ case 'I': /* -I handled both here and in parse_body() */
+ forbid_setid('I', FALSE);
+diff --git a/t/op/lex.t b/t/op/lex.t
+index c515449..9ada592 100644
+--- a/t/op/lex.t
++++ b/t/op/lex.t
+@@ -7,7 +7,7 @@ use warnings;
+
+ BEGIN { chdir 't' if -d 't'; require './test.pl'; }
+
+-plan(tests => 25);
++plan(tests => 26);
+
+ {
+ no warnings 'deprecated';
+@@ -209,3 +209,10 @@ fresh_perl_is(
+ { stderr => 1 },
+ 's;@{<<a; [perl #123995]'
+ );
++
++fresh_perl_like(
++ "#!perl -i u\nprint 'OK'",
++ qr/OK/,
++ {},
++ '[perl #129336] - #!perl -i argument handling'
++);
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index ddfb586..0893966 100644
--- a/perl.spec
+++ b/perl.spec
@@ -203,6 +203,9 @@ Patch53: perl-5.25.4-perl-129267-Test-for-gv_fetchmethod-buffer-overrun.p
# in upstream after 5.25.5
Patch54: perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf.patch
+# Fix parsing perl options in shell bang line, RT#129336,
+# in upstream after 5.25.5
+Patch55: perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patch
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2880,6 +2883,7 @@ Perl extension for Version Objects
%patch52 -p1
%patch53 -p1
%patch54 -p1
+%patch55 -p1
%patch200 -p1
%patch201 -p1
@@ -2925,6 +2929,7 @@ perl -x patchlevel.h \
'Fedora Patch52: Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)' \
'Fedora Patch53: Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)' \
'Fedora Patch54: Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)' \
+ 'Fedora Patch55: Fix parsing perl options in shell bang line (RT#129336)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5208,6 +5213,7 @@ popd
- Fix crash in splice (RT#129164, RT#129166, RT#129167)
- Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)
- Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)
+- Fix parsing perl options in shell bang line (RT#129336)
* Fri Sep 02 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
- perl-core depends on Parse::CPAN::Meta module instead of package name to allow
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=dee7e92b2...
7 years, 7 months
ppisar pushed to perl (master). "Fix crash in "evalbytes S""
by notifications@fedoraproject.org
From 896d33a2d025506e31d5cb84763e7cecc3392342 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 09:16:29 +0100
Subject: Fix crash in "evalbytes S"
---
perl-5.24.0-Regression-test-for-RT-129196.patch | 45 +++++++++++++++++++++
...rl-129196-Crash-bad-read-with-evalbytes-S.patch | 37 +++++++++++++++++
perl-5.25.4-toke.c-fix-mswin32-builds.patch | 46 ++++++++++++++++++++++
perl.spec | 16 +++++++-
4 files changed, 143 insertions(+), 1 deletion(-)
create mode 100644 perl-5.24.0-Regression-test-for-RT-129196.patch
create mode 100644 perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
create mode 100644 perl-5.25.4-toke.c-fix-mswin32-builds.patch
diff --git a/perl-5.24.0-Regression-test-for-RT-129196.patch b/perl-5.24.0-Regression-test-for-RT-129196.patch
new file mode 100644
index 0000000..23beb36
--- /dev/null
+++ b/perl-5.24.0-Regression-test-for-RT-129196.patch
@@ -0,0 +1,45 @@
+From a51d828a6d402f30f37707c714de218f6b47dbd8 Mon Sep 17 00:00:00 2001
+From: Dan Collins <dcollinsn(a)gmail.com>
+Date: Sun, 4 Sep 2016 14:43:41 -0400
+Subject: [PATCH] Regression test for RT #129196
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported to 5.24.0:
+
+commit a6128716d2cc20147851e0a37768376647bd3242
+Author: Dan Collins <dcollinsn(a)gmail.com>
+Date: Sun Sep 4 14:43:41 2016 -0400
+
+ Regression test for RT #129196
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ t/op/evalbytes.t | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/t/op/evalbytes.t b/t/op/evalbytes.t
+index cca7c04..5e2af76 100644
+--- a/t/op/evalbytes.t
++++ b/t/op/evalbytes.t
+@@ -6,7 +6,7 @@ BEGIN {
+ require './test.pl'; require './charset_tools.pl';
+ }
+
+-plan(tests => 8);
++plan(tests => 9);
+
+ {
+ local $SIG{__WARN__} = sub {};
+@@ -33,3 +33,7 @@ chop($upcode = "use utf8; $U_100" . chr 256);
+ is evalbytes $upcode, chr 256, 'use utf8 within evalbytes on utf8 string';
+ eval { evalbytes chr 256 };
+ like $@, qr/Wide character/, 'evalbytes croaks on non-bytes';
++
++eval 'evalbytes S';
++ok 1, '[RT #129196] evalbytes S should not segfault';
++
+--
+2.7.4
+
diff --git a/perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch b/perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
new file mode 100644
index 0000000..e224f30
--- /dev/null
+++ b/perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
@@ -0,0 +1,37 @@
+From 9bde56224e82f20e7a65b3469b1ffb6b9f6d4df8 Mon Sep 17 00:00:00 2001
+From: Father Chrysostomos <sprout(a)cpan.org>
+Date: Sun, 4 Sep 2016 20:24:19 -0700
+Subject: [PATCH] =?UTF-8?q?[perl=20#129196]=20Crash/bad=20read=20with=20?=
+ =?UTF-8?q?=E2=80=98evalbytes=20S=E2=80=99?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+5dc13276 added some code to toke.c that did not take into account
+that the opnum (‘f’) argument to UNI* could be a negated op number.
+PL_last_lop_op must never be negative, since it is used as an offset
+into a struct.
+
+Tests for the crash will come in the next commit.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ toke.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toke.c b/toke.c
+index 2fe8b69..2350703 100644
+--- a/toke.c
++++ b/toke.c
+@@ -241,7 +241,7 @@ static const char* const lex_state_names[] = {
+ if (have_x) PL_expect = x; \
+ PL_bufptr = s; \
+ PL_last_uni = PL_oldbufptr; \
+- PL_last_lop_op = f; \
++ PL_last_lop_op = f < 0 ? -f : f; \
+ if (*s == '(') \
+ return REPORT( (int)FUNC1 ); \
+ s = skipspace(s); \
+--
+2.7.4
+
diff --git a/perl-5.25.4-toke.c-fix-mswin32-builds.patch b/perl-5.25.4-toke.c-fix-mswin32-builds.patch
new file mode 100644
index 0000000..5b066c8
--- /dev/null
+++ b/perl-5.25.4-toke.c-fix-mswin32-builds.patch
@@ -0,0 +1,46 @@
+From 0af40c757f083cc12988effb46da5313cd042f00 Mon Sep 17 00:00:00 2001
+From: David Mitchell <davem(a)iabyn.com>
+Date: Mon, 5 Sep 2016 15:49:28 +0100
+Subject: [PATCH] toke.c: fix mswin32 builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+9bde56224 added this as part of macro:
+
+- PL_last_lop_op = f; \
++ PL_last_lop_op = f < 0 ? -f : f; \
+
+which broke win32 builds due to this
+
+ UNIBRACK(-OP_ENTEREVAL)
+
+expanding to
+
+ PL_last_lop_op = -345 < 0 ? --345 : -345
+
+and the -- being seen as a pre-dec op.
+
+Diagnosed by Dagfinn Ilmari Mannsåker.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ toke.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toke.c b/toke.c
+index 2350703..a1cdda8 100644
+--- a/toke.c
++++ b/toke.c
+@@ -241,7 +241,7 @@ static const char* const lex_state_names[] = {
+ if (have_x) PL_expect = x; \
+ PL_bufptr = s; \
+ PL_last_uni = PL_oldbufptr; \
+- PL_last_lop_op = f < 0 ? -f : f; \
++ PL_last_lop_op = (f) < 0 ? -(f) : (f); \
+ if (*s == '(') \
+ return REPORT( (int)FUNC1 ); \
+ s = skipspace(s); \
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index fecc951..6a5811a 100644
--- a/perl.spec
+++ b/perl.spec
@@ -28,7 +28,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
-Release: 378%{?dist}
+Release: 379%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -183,6 +183,11 @@ Patch43: perl-5.24.0-PATCH-perl-128734-tr-N-.-failing-for-128-255.patch
# in upstream after 5.24.1
Patch44: perl-5.24.0-CVE-2016-1238-maint-5.24-dot-in-inc.patch
+# Fix crash in "evalbytes S", RT#129196, in upstream after 5.25.4
+Patch45: perl-5.25.4-perl-129196-Crash-bad-read-with-evalbytes-S.patch
+Patch46: perl-5.24.0-Regression-test-for-RT-129196.patch
+Patch47: perl-5.25.4-toke.c-fix-mswin32-builds.patch
+
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2850,6 +2855,9 @@ Perl extension for Version Objects
%patch42 -p1
%patch43 -p1
%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
%patch200 -p1
%patch201 -p1
@@ -2885,6 +2893,9 @@ perl -x patchlevel.h \
'Fedora Patch42: Fix a crash in lexical scope warnings (RT#128597)' \
'Fedora Patch43: Fix handling \N{} in tr for characters in range 128--255 (RT#128734)' \
'Fedora Patch44: Avoid loading of modules from current directory (CVE-2016-1238)' \
+ 'Fedora Patch45: Fix crash in "evalbytes S" (RT#129196)' \
+ 'Fedora Patch46: Fix crash in "evalbytes S" (RT#129196)' \
+ 'Fedora Patch47: Fix crash in "evalbytes S" (RT#129196)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5163,6 +5174,9 @@ popd
# Old changelog entries are preserved in CVS.
%changelog
+* Thu Nov 03 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-379
+- Fix crash in "evalbytes S" (RT#129196)
+
* Fri Sep 02 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
- perl-core depends on Parse::CPAN::Meta module instead of package name to allow
upgrading perl-CPAN-Meta to 2.150010 (bug #1370681)
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=896d33a2d...
7 years, 7 months
ppisar pushed to perl (master). "Fix crash when matching UTF-8 string
with non-UTF-8 substrings"
by notifications@fedoraproject.org
From 20d4f3847b2d022e33ac547dd2b855cca57d4621 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 3 Nov 2016 12:59:22 +0100
Subject: Fix crash when matching UTF-8 string with non-UTF-8 substrings
---
...-anchored-floating-substrings-must-be-utf.patch | 56 ++++++++++++++++++++++
perl.spec | 7 +++
2 files changed, 63 insertions(+)
create mode 100644 perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf.patch
diff --git a/perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf.patch b/perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf.patch
new file mode 100644
index 0000000..9880f2d
--- /dev/null
+++ b/perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf.patch
@@ -0,0 +1,56 @@
+From 62130748594f803da49b6abf3e352e51148a3886 Mon Sep 17 00:00:00 2001
+From: Hugo van der Sanden <hv(a)crypt.org>
+Date: Tue, 4 Oct 2016 14:40:11 +0100
+Subject: [PATCH] anchored/floating substrings must be utf8 if target is
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported to 5.24.0:
+
+commit 2814f4b3549f665a6f9203ac9e890ae1e415e0dc
+Author: Hugo van der Sanden <hv(a)crypt.org>
+Date: Tue Oct 4 14:40:11 2016 +0100
+
+ [perl #129350] anchored/floating substrings must be utf8 if target is
+
+ If the target is utf8 and either the anchored or floating substrings
+ are not, we need to create utf8 copies to check against. The state
+ of the two substrings may not be the same, but we were only testing
+ whichever we planned to check first.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ regexec.c | 3 ++-
+ t/re/re_tests | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/regexec.c b/regexec.c
+index cdaa95c..38ff44a 100644
+--- a/regexec.c
++++ b/regexec.c
+@@ -703,7 +703,8 @@ Perl_re_intuit_start(pTHX_
+ reginfo->poscache_maxiter = 0;
+
+ if (utf8_target) {
+- if (!prog->check_utf8 && prog->check_substr)
++ if ((!prog->anchored_utf8 && prog->anchored_substr)
++ || (!prog->float_utf8 && prog->float_substr))
+ to_utf8_substr(prog);
+ check = prog->check_utf8;
+ } else {
+diff --git a/t/re/re_tests b/t/re/re_tests
+index 7e8522d..2f4d00c 100644
+--- a/t/re/re_tests
++++ b/t/re/re_tests
+@@ -1968,6 +1968,7 @@ ab(?#Comment){2}c abbc y $& abbc
+ (?:.||)(?|)000000000@ 000000000@ y $& 000000000@ # [perl #126405]
+ aa$|a(?R)a|a aaa y $& aaa # [perl 128420] recursive matches
+ (?:\1|a)([bcd])\1(?:(?R)|e)\1 abbaccaddedcb y $& abbaccaddedcb # [perl 128420] recursive match with backreferences
++\b\z0*\x{100} .\x{100} n - - # [perl #129350] crashed in intuit_start
+
+ # Keep these lines at the end of the file
+ # vim: softtabstop=0 noexpandtab
+--
+2.7.4
+
diff --git a/perl.spec b/perl.spec
index c7db416..ddfb586 100644
--- a/perl.spec
+++ b/perl.spec
@@ -199,6 +199,10 @@ Patch51: perl-5.25.4-clean-up-gv_fetchmethod_pvn_flags-rename-nsplit-to-l
Patch52: perl-5.25.4-fix-129267-rework-gv_fetchmethod_pvn_flags-separator.patch
Patch53: perl-5.25.4-perl-129267-Test-for-gv_fetchmethod-buffer-overrun.patch
+# Fix crash when matching UTF-8 string with non-UTF-8 substrings, RT#129350,
+# in upstream after 5.25.5
+Patch54: perl-5.24.0-perl-129350-anchored-floating-substrings-must-be-utf.patch
+
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@@ -2875,6 +2879,7 @@ Perl extension for Version Objects
%patch51 -p1
%patch52 -p1
%patch53 -p1
+%patch54 -p1
%patch200 -p1
%patch201 -p1
@@ -2919,6 +2924,7 @@ perl -x patchlevel.h \
'Fedora Patch51: Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)' \
'Fedora Patch52: Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)' \
'Fedora Patch53: Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)' \
+ 'Fedora Patch54: Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@@ -5201,6 +5207,7 @@ popd
- Fix crash in "evalbytes S" (RT#129196)
- Fix crash in splice (RT#129164, RT#129166, RT#129167)
- Fix string overrun in Perl_gv_fetchmethod_pvn_flags (RT#129267)
+- Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)
* Fri Sep 02 2016 Petr Pisar <ppisar(a)redhat.com> - 4:5.24.0-378
- perl-core depends on Parse::CPAN::Meta module instead of package name to allow
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=master&id=20d4f3847...
7 years, 7 months