summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Tran <dantran@microsoft.com>2019-09-30 23:11:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-10 16:52:30 +0100
commitbda26ff31cb7f2f097f837ecc29bb5a056d569eb (patch)
treec6417d191b267c5c95ce31a05de11c5769939dba
parentcc0605bad6c2bde06136f3af5eeb145a9636c5d2 (diff)
downloadpoky-bda26ff31cb7f2f097f837ecc29bb5a056d569eb.tar.gz
perl: Fix CVE-2018-18311 to 18314
(From OE-Core rev: cffd085ef77d055e5e837887b0eaf820aa982f00) Signed-off-by: Dan Tran <dantran@microsoft.com> [Perl before 5.26.3 and 5.28.x before 5.28.1] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/perl/perl/CVE-2018-18311.patch183
-rw-r--r--meta/recipes-devtools/perl/perl/CVE-2018-18312.patchbin0 -> 2125 bytes
-rw-r--r--meta/recipes-devtools/perl/perl/CVE-2018-18313.patch60
-rw-r--r--meta/recipes-devtools/perl/perl/CVE-2018-18314.patch271
-rw-r--r--meta/recipes-devtools/perl/perl_5.24.4.bb4
5 files changed, 518 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl/CVE-2018-18311.patch b/meta/recipes-devtools/perl/perl/CVE-2018-18311.patch
new file mode 100644
index 0000000000..ba8cf151fd
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl/CVE-2018-18311.patch
@@ -0,0 +1,183 @@
1From 4706b65d7c835c0bb219db160fbcdbcd98efab2d Mon Sep 17 00:00:00 2001
2From: David Mitchell <davem@iabyn.com>
3Date: Fri, 29 Jun 2018 13:37:03 +0100
4Subject: [PATCH] Perl_my_setenv(); handle integer wrap
5
6RT #133204
7
8Wean this function off int/I32 and onto UV/Size_t.
9Also, replace all malloc-ish calls with a wrapper that does
10overflow checks,
11
12In particular, it was doing (nlen + vlen + 2) which could wrap when
13the combined length of the environment variable name and value
14exceeded around 0x7fffffff.
15
16The wrapper check function is probably overkill, but belt and braces...
17
18NB this function has several variant parts, #ifdef'ed by platform
19type; I have blindly changed the parts that aren't compiled under linux.
20
21(cherry picked from commit 34716e2a6ee2af96078d62b065b7785c001194be)
22
23CVE: CVE-2018-18311
24Upstream-Status: Backport
25[https://perl5.git.perl.org/perl.git/commit/5737d31aac51360cc1eb412ef059e36147c9d6d6]
26
27Signed-off-by: Dan Tran <dantran@microsoft.com>
28---
29 util.c | 76 ++++++++++++++++++++++++++++++++++++++++------------------
30 1 file changed, 53 insertions(+), 23 deletions(-)
31
32diff --git a/util.c b/util.c
33index 7c3d271f51..27f4eddf3b 100644
34--- a/util.c
35+++ b/util.c
36@@ -2160,8 +2160,40 @@ Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits,
37 *(s+(nlen+1+vlen)) = '\0'
38
39 #ifdef USE_ENVIRON_ARRAY
40- /* VMS' my_setenv() is in vms.c */
41+
42+/* small wrapper for use by Perl_my_setenv that mallocs, or reallocs if
43+ * 'current' is non-null, with up to three sizes that are added together.
44+ * It handles integer overflow.
45+ */
46+static char *
47+S_env_alloc(void *current, Size_t l1, Size_t l2, Size_t l3, Size_t size)
48+{
49+ void *p;
50+ Size_t sl, l = l1 + l2;
51+
52+ if (l < l2)
53+ goto panic;
54+ l += l3;
55+ if (l < l3)
56+ goto panic;
57+ sl = l * size;
58+ if (sl < l)
59+ goto panic;
60+
61+ p = current
62+ ? safesysrealloc(current, sl)
63+ : safesysmalloc(sl);
64+ if (p)
65+ return (char*)p;
66+
67+ panic:
68+ croak_memory_wrap();
69+}
70+
71+
72+/* VMS' my_setenv() is in vms.c */
73 #if !defined(WIN32) && !defined(NETWARE)
74+
75 void
76 Perl_my_setenv(pTHX_ const char *nam, const char *val)
77 {
78@@ -2177,28 +2209,27 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
79 #ifndef PERL_USE_SAFE_PUTENV
80 if (!PL_use_safe_putenv) {
81 /* most putenv()s leak, so we manipulate environ directly */
82- I32 i;
83- const I32 len = strlen(nam);
84- int nlen, vlen;
85+ UV i;
86+ Size_t vlen, nlen = strlen(nam);
87
88 /* where does it go? */
89 for (i = 0; environ[i]; i++) {
90- if (strnEQ(environ[i],nam,len) && environ[i][len] == '=')
91+ if (strnEQ(environ[i], nam, nlen) && environ[i][nlen] == '=')
92 break;
93 }
94
95 if (environ == PL_origenviron) { /* need we copy environment? */
96- I32 j;
97- I32 max;
98+ UV j, max;
99 char **tmpenv;
100
101 max = i;
102 while (environ[max])
103 max++;
104- tmpenv = (char**)safesysmalloc((max+2) * sizeof(char*));
105+ /* XXX shouldn't that be max+1 rather than max+2 ??? - DAPM */
106+ tmpenv = (char**)S_env_alloc(NULL, max, 2, 0, sizeof(char*));
107 for (j=0; j<max; j++) { /* copy environment */
108- const int len = strlen(environ[j]);
109- tmpenv[j] = (char*)safesysmalloc((len+1)*sizeof(char));
110+ const Size_t len = strlen(environ[j]);
111+ tmpenv[j] = S_env_alloc(NULL, len, 1, 0, 1);
112 Copy(environ[j], tmpenv[j], len+1, char);
113 }
114 tmpenv[max] = NULL;
115@@ -2217,15 +2248,15 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
116 #endif
117 }
118 if (!environ[i]) { /* does not exist yet */
119- environ = (char**)safesysrealloc(environ, (i+2) * sizeof(char*));
120+ environ = (char**)S_env_alloc(environ, i, 2, 0, sizeof(char*));
121 environ[i+1] = NULL; /* make sure it's null terminated */
122 }
123 else
124 safesysfree(environ[i]);
125- nlen = strlen(nam);
126+
127 vlen = strlen(val);
128
129- environ[i] = (char*)safesysmalloc((nlen+vlen+2) * sizeof(char));
130+ environ[i] = S_env_alloc(NULL, nlen, vlen, 2, 1);
131 /* all that work just for this */
132 my_setenv_format(environ[i], nam, nlen, val, vlen);
133 } else {
134@@ -2250,22 +2281,21 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
135 if (environ) /* old glibc can crash with null environ */
136 (void)unsetenv(nam);
137 } else {
138- const int nlen = strlen(nam);
139- const int vlen = strlen(val);
140- char * const new_env =
141- (char*)safesysmalloc((nlen + vlen + 2) * sizeof(char));
142+ const Size_t nlen = strlen(nam);
143+ const Size_t vlen = strlen(val);
144+ char * const new_env = S_env_alloc(NULL, nlen, vlen, 2, 1);
145 my_setenv_format(new_env, nam, nlen, val, vlen);
146 (void)putenv(new_env);
147 }
148 # else /* ! HAS_UNSETENV */
149 char *new_env;
150- const int nlen = strlen(nam);
151- int vlen;
152+ const Size_t nlen = strlen(nam);
153+ Size_t vlen;
154 if (!val) {
155 val = "";
156 }
157 vlen = strlen(val);
158- new_env = (char*)safesysmalloc((nlen + vlen + 2) * sizeof(char));
159+ new_env = S_env_alloc(NULL, nlen, vlen, 2, 1);
160 /* all that work just for this */
161 my_setenv_format(new_env, nam, nlen, val, vlen);
162 (void)putenv(new_env);
163@@ -2288,14 +2318,14 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
164 {
165 dVAR;
166 char *envstr;
167- const int nlen = strlen(nam);
168- int vlen;
169+ const Size_t nlen = strlen(nam);
170+ Size_t vlen;
171
172 if (!val) {
173 val = "";
174 }
175 vlen = strlen(val);
176- Newx(envstr, nlen+vlen+2, char);
177+ envstr = S_env_alloc(NULL, nlen, vlen, 2, 1);
178 my_setenv_format(envstr, nam, nlen, val, vlen);
179 (void)PerlEnv_putenv(envstr);
180 Safefree(envstr);
181--
1822.22.0.vfs.1.1.57.gbaf16c8
183
diff --git a/meta/recipes-devtools/perl/perl/CVE-2018-18312.patch b/meta/recipes-devtools/perl/perl/CVE-2018-18312.patch
new file mode 100644
index 0000000000..1c3426542d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl/CVE-2018-18312.patch
Binary files differ
diff --git a/meta/recipes-devtools/perl/perl/CVE-2018-18313.patch b/meta/recipes-devtools/perl/perl/CVE-2018-18313.patch
new file mode 100644
index 0000000000..540aa073fb
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl/CVE-2018-18313.patch
@@ -0,0 +1,60 @@
1From 3458f6115ca8e8d11779948c12b7e1cc5803358c Mon Sep 17 00:00:00 2001
2From: Karl Williamson <khw@cpan.org>
3Date: Sat, 25 Mar 2017 15:00:22 -0600
4Subject: [PATCH 2/3] regcomp.c: Convert some strchr to memchr
5
6This allows things to work properly in the face of embedded NULs.
7See the branch merge message for more information.
8
9(cherry picked from commit 43b2f4ef399e2fd7240b4eeb0658686ad95f8e62)
10
11CVE: CVE-2018-18313
12Upstream-Status: Backport
13[https://perl5.git.perl.org/perl.git/commit/c1c28ce6ba90ee05aa96b11ad551a6063680f3b9]
14
15Signed-off-by: Dan Tran <dantran@microsoft.com>
16---
17 regcomp.c | 13 ++++++++-----
18 1 file changed, 8 insertions(+), 5 deletions(-)
19
20diff --git a/regcomp.c b/regcomp.c
21index 00d26d9290..2688979882 100644
22--- a/regcomp.c
23+++ b/regcomp.c
24@@ -11783,8 +11783,9 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
25
26 RExC_parse++; /* Skip past the '{' */
27
28- if (! (endbrace = strchr(RExC_parse, '}')) /* no trailing brace */
29- || ! (endbrace == RExC_parse /* nothing between the {} */
30+ endbrace = (char *) memchr(RExC_parse, '}', RExC_end - RExC_parse);
31+ if ((! endbrace) /* no trailing brace */
32+ || ! (endbrace == RExC_parse /* nothing between the {} */
33 || (endbrace - RExC_parse >= 2 /* U+ (bad hex is checked... */
34 && strnEQ(RExC_parse, "U+", 2)))) /* ... below for a better
35 error msg) */
36@@ -12483,9 +12484,11 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
37 else {
38 STRLEN length;
39 char name = *RExC_parse;
40- char * endbrace;
41+ char * endbrace = NULL;
42 RExC_parse += 2;
43- endbrace = strchr(RExC_parse, '}');
44+ if (RExC_parse < RExC_end) {
45+ endbrace = (char *) memchr(RExC_parse, '}', RExC_end - RExC_parse);
46+ }
47
48 if (! endbrace) {
49 vFAIL2("Missing right brace on \\%c{}", name);
50@@ -15939,7 +15942,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
51 vFAIL2("Empty \\%c", (U8)value);
52 if (*RExC_parse == '{') {
53 const U8 c = (U8)value;
54- e = strchr(RExC_parse, '}');
55+ e = (char *) memchr(RExC_parse, '}', RExC_end - RExC_parse);
56 if (!e) {
57 RExC_parse++;
58 vFAIL2("Missing right brace on \\%c{}", c);
59--
602.22.0.vfs.1.1.57.gbaf16c8
diff --git a/meta/recipes-devtools/perl/perl/CVE-2018-18314.patch b/meta/recipes-devtools/perl/perl/CVE-2018-18314.patch
new file mode 100644
index 0000000000..e84e7bc4e4
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl/CVE-2018-18314.patch
@@ -0,0 +1,271 @@
1From 6a2d07f43ae7cfcb2eb30cf39751f2f7fed7ecc1 Mon Sep 17 00:00:00 2001
2From: Yves Orton <demerphq@gmail.com>
3Date: Mon, 26 Jun 2017 13:19:55 +0200
4Subject: [PATCH 3/3] fix #131649 - extended charclass can trigger assert
5
6The extended charclass parser makes some assumptions during the
7first pass which are only true on well structured input, and it
8does not properly catch various errors. later on the code assumes
9that things the first pass will let through are valid, when in
10fact they should trigger errors.
11
12(cherry picked from commit 19a498a461d7c81ae3507c450953d1148efecf4f)
13
14CVE: CVE-2018-18314
15Upstream-Status: Backport
16[https://perl5.git.perl.org/perl.git/commit/dabe076af345ab4512ea80245b4e4cd7ec0996cd]
17
18Signed-off-by: Dan Tran <dantran@microsoft.com>
19---
20 pod/perldiag.pod | 27 ++++++++++++++++++++++++++-
21 pod/perlrecharclass.pod | 4 ++--
22 regcomp.c | 23 +++++++++++++----------
23 t/lib/warnings/regcomp | 6 +++---
24 t/re/reg_mesg.t | 29 ++++++++++++++++-------------
25 t/re/regex_sets.t | 6 +++---
26 6 files changed, 63 insertions(+), 32 deletions(-)
27
28diff --git a/pod/perldiag.pod b/pod/perldiag.pod
29index 737d3633f6..644b814008 100644
30--- a/pod/perldiag.pod
31+++ b/pod/perldiag.pod
32@@ -5777,7 +5777,7 @@ yourself.
33 a perl4 interpreter, especially if the next 2 tokens are "use strict"
34 or "my $var" or "our $var".
35
36-=item Syntax error in (?[...]) in regex m/%s/
37+=item Syntax error in (?[...]) in regex; marked by <-- HERE in m/%s/
38
39 (F) Perl could not figure out what you meant inside this construct; this
40 notifies you that it is giving up trying.
41@@ -6153,6 +6153,31 @@ for example,
42 (F) The unexec() routine failed for some reason. See your local FSF
43 representative, who probably put it there in the first place.
44
45+=item Unexpected ']' with no following ')' in (?[... in regex; marked by <-- HERE in m/%s/
46+
47+(F) While parsing an extended character class a ']' character was encountered
48+at a point in the definition where the only legal use of ']' is to close the
49+character class definition as part of a '])', you may have forgotten the close
50+paren, or otherwise confused the parser.
51+
52+=item Expecting close paren for nested extended charclass in regex; marked by <-- HERE in m/%s/
53+
54+(F) While parsing a nested extended character class like:
55+
56+ (?[ ... (?flags:(?[ ... ])) ... ])
57+ ^
58+
59+we expected to see a close paren ')' (marked by ^) but did not.
60+
61+=item Expecting close paren for wrapper for nested extended charclass in regex; marked by <-- HERE in m/%s/
62+
63+(F) While parsing a nested extended character class like:
64+
65+ (?[ ... (?flags:(?[ ... ])) ... ])
66+ ^
67+
68+we expected to see a close paren ')' (marked by ^) but did not.
69+
70 =item Unexpected binary operator '%c' with no preceding operand in regex;
71 marked by S<<-- HERE> in m/%s/
72
73diff --git a/pod/perlrecharclass.pod b/pod/perlrecharclass.pod
74index 89f4a7ef3f..a557cc0384 100644
75--- a/pod/perlrecharclass.pod
76+++ b/pod/perlrecharclass.pod
77@@ -1101,8 +1101,8 @@ hence both of the following work:
78 Any contained POSIX character classes, including things like C<\w> and C<\D>
79 respect the C<E<sol>a> (and C<E<sol>aa>) modifiers.
80
81-C<< (?[ ]) >> is a regex-compile-time construct. Any attempt to use
82-something which isn't knowable at the time the containing regular
83+Note that C<< (?[ ]) >> is a regex-compile-time construct. Any attempt
84+to use something which isn't knowable at the time the containing regular
85 expression is compiled is a fatal error. In practice, this means
86 just three limitations:
87
88diff --git a/regcomp.c b/regcomp.c
89index 2688979882..cb8409ed27 100644
90--- a/regcomp.c
91+++ b/regcomp.c
92@@ -14609,8 +14609,9 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist,
93 TRUE /* Force /x */ );
94
95 switch (*RExC_parse) {
96- case '?':
97- if (RExC_parse[1] == '[') depth++, RExC_parse++;
98+ case '(':
99+ if (RExC_parse[1] == '?' && RExC_parse[2] == '[')
100+ depth++, RExC_parse+=2;
101 /* FALLTHROUGH */
102 default:
103 break;
104@@ -14667,9 +14668,9 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist,
105 }
106
107 case ']':
108- if (depth--) break;
109- RExC_parse++;
110- if (*RExC_parse == ')') {
111+ if (RExC_parse[1] == ')') {
112+ RExC_parse++;
113+ if (depth--) break;
114 node = reganode(pRExC_state, ANYOF, 0);
115 RExC_size += ANYOF_SKIP;
116 nextchar(pRExC_state);
117@@ -14681,20 +14682,20 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist,
118
119 return node;
120 }
121- goto no_close;
122+ RExC_parse++;
123+ vFAIL("Unexpected ']' with no following ')' in (?[...");
124 }
125
126 RExC_parse += UTF ? UTF8SKIP(RExC_parse) : 1;
127 }
128
129- no_close:
130 /* We output the messages even if warnings are off, because we'll fail
131 * the very next thing, and these give a likely diagnosis for that */
132 if (posix_warnings && av_tindex_nomg(posix_warnings) >= 0) {
133 output_or_return_posix_warnings(pRExC_state, posix_warnings, NULL);
134 }
135
136- FAIL("Syntax error in (?[...])");
137+ vFAIL("Syntax error in (?[...])");
138 }
139
140 /* Pass 2 only after this. */
141@@ -14868,12 +14869,14 @@ redo_curchar:
142 * inversion list, and RExC_parse points to the trailing
143 * ']'; the next character should be the ')' */
144 RExC_parse++;
145- assert(UCHARAT(RExC_parse) == ')');
146+ if (UCHARAT(RExC_parse) != ')')
147+ vFAIL("Expecting close paren for nested extended charclass");
148
149 /* Then the ')' matching the original '(' handled by this
150 * case: statement */
151 RExC_parse++;
152- assert(UCHARAT(RExC_parse) == ')');
153+ if (UCHARAT(RExC_parse) != ')')
154+ vFAIL("Expecting close paren for wrapper for nested extended charclass");
155
156 RExC_flags = save_flags;
157 goto handle_operand;
158diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp
159index 08cb27b00f..367276d0fc 100644
160--- a/t/lib/warnings/regcomp
161+++ b/t/lib/warnings/regcomp
162@@ -59,21 +59,21 @@ Unmatched [ in regex; marked by <-- HERE in m/abc[ <-- HERE fi[.00./ at - line
163 qr/(?[[[:word]]])/;
164 EXPECT
165 Assuming NOT a POSIX class since there is no terminating ':' in regex; marked by <-- HERE in m/(?[[[:word <-- HERE ]]])/ at - line 2.
166-syntax error in (?[...]) in regex m/(?[[[:word]]])/ at - line 2.
167+Unexpected ']' with no following ')' in (?[... in regex; marked by <-- HERE in m/(?[[[:word]] <-- HERE ])/ at - line 2.
168 ########
169 # NAME qr/(?[ [[:digit: ])/
170 # OPTION fatal
171 qr/(?[[[:digit: ])/;
172 EXPECT
173 Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[[:digit: ] <-- HERE )/ at - line 2.
174-syntax error in (?[...]) in regex m/(?[[[:digit: ])/ at - line 2.
175+syntax error in (?[...]) in regex; marked by <-- HERE in m/(?[[[:digit: ]) <-- HERE / at - line 2.
176 ########
177 # NAME qr/(?[ [:digit: ])/
178 # OPTION fatal
179 qr/(?[[:digit: ])/
180 EXPECT
181 Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[:digit: ] <-- HERE )/ at - line 2.
182-syntax error in (?[...]) in regex m/(?[[:digit: ])/ at - line 2.
183+syntax error in (?[...]) in regex; marked by <-- HERE in m/(?[[:digit: ]) <-- HERE / at - line 2.
184 ########
185 # NAME [perl #126141]
186 # OPTION fatal
187diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
188index 658397ac27..08a3688e1d 100644
189--- a/t/re/reg_mesg.t
190+++ b/t/re/reg_mesg.t
191@@ -202,8 +202,9 @@ my @death =
192 '/\b{gc}/' => "'gc' is an unknown bound type {#} m/\\b{gc{#}}/",
193 '/\B{gc}/' => "'gc' is an unknown bound type {#} m/\\B{gc{#}}/",
194
195- '/(?[[[::]]])/' => "Syntax error in (?[...]) in regex m/(?[[[::]]])/",
196- '/(?[[[:w:]]])/' => "Syntax error in (?[...]) in regex m/(?[[[:w:]]])/",
197+
198+ '/(?[[[::]]])/' => "Unexpected ']' with no following ')' in (?[... {#} m/(?[[[::]]{#}])/",
199+ '/(?[[[:w:]]])/' => "Unexpected ']' with no following ')' in (?[... {#} m/(?[[[:w:]]{#}])/",
200 '/(?[[:w:]])/' => "",
201 '/[][[:alpha:]]' => "", # [perl #127581]
202 '/([.].*)[.]/' => "", # [perl #127582]
203@@ -227,11 +228,12 @@ my @death =
204 '/(?[ \p{foo} ])/' => 'Can\'t find Unicode property definition "foo" {#} m/(?[ \p{foo}{#} ])/',
205 '/(?[ \p{ foo = bar } ])/' => 'Can\'t find Unicode property definition "foo = bar" {#} m/(?[ \p{ foo = bar }{#} ])/',
206 '/(?[ \8 ])/' => 'Unrecognized escape \8 in character class {#} m/(?[ \8{#} ])/',
207- '/(?[ \t ]/' => 'Syntax error in (?[...]) in regex m/(?[ \t ]/',
208- '/(?[ [ \t ]/' => 'Syntax error in (?[...]) in regex m/(?[ [ \t ]/',
209- '/(?[ \t ] ]/' => 'Syntax error in (?[...]) in regex m/(?[ \t ] ]/',
210- '/(?[ [ ] ]/' => 'Syntax error in (?[...]) in regex m/(?[ [ ] ]/',
211- '/(?[ \t + \e # This was supposed to be a comment ])/' => 'Syntax error in (?[...]) in regex m/(?[ \t + \e # This was supposed to be a comment ])/',
212+ '/(?[ \t ]/' => "Unexpected ']' with no following ')' in (?[... {#} m/(?[ \\t ]{#}/",
213+ '/(?[ [ \t ]/' => "Syntax error in (?[...]) {#} m/(?[ [ \\t ]{#}/",
214+ '/(?[ \t ] ]/' => "Unexpected ']' with no following ')' in (?[... {#} m/(?[ \\t ]{#} ]/",
215+ '/(?[ [ ] ]/' => "Syntax error in (?[...]) {#} m/(?[ [ ] ]{#}/",
216+ '/(?[ \t + \e # This was supposed to be a comment ])/' =>
217+ "Syntax error in (?[...]) {#} m/(?[ \\t + \\e # This was supposed to be a comment ]){#}/",
218 '/(?[ ])/' => 'Incomplete expression within \'(?[ ])\' {#} m/(?[ {#}])/',
219 'm/(?[[a-\d]])/' => 'False [] range "a-\d" {#} m/(?[[a-\d{#}]])/',
220 'm/(?[[\w-x]])/' => 'False [] range "\w-" {#} m/(?[[\w-{#}x]])/',
221@@ -410,10 +412,10 @@ my @death_utf8 = mark_as_utf8(
222
223 '/ネ\p{}ネ/' => 'Empty \p{} {#} m/ネ\p{{#}}ネ/',
224
225- '/ネ(?[[[:ネ]]])ネ/' => "Syntax error in (?[...]) in regex m/ネ(?[[[:ネ]]])ネ/",
226- '/ネ(?[[[:ネ: ])ネ/' => "Syntax error in (?[...]) in regex m/ネ(?[[[:ネ: ])ネ/",
227- '/ネ(?[[[::]]])ネ/' => "Syntax error in (?[...]) in regex m/ネ(?[[[::]]])ネ/",
228- '/ネ(?[[[:ネ:]]])ネ/' => "Syntax error in (?[...]) in regex m/ネ(?[[[:ネ:]]])ネ/",
229+ '/ネ(?[[[:ネ]]])ネ/' => "Unexpected ']' with no following ')' in (?[... {#} m/ネ(?[[[:ネ]]{#}])ネ/",
230+ '/ネ(?[[[:ネ: ])ネ/' => "Syntax error in (?[...]) {#} m/ネ(?[[[:ネ: ])ネ{#}/",
231+ '/ネ(?[[[::]]])ネ/' => "Unexpected ']' with no following ')' in (?[... {#} m/ネ(?[[[::]]{#}])ネ/",
232+ '/ネ(?[[[:ネ:]]])ネ/' => "Unexpected ']' with no following ')' in (?[... {#} m/ネ(?[[[:ネ:]]{#}])ネ/",
233 '/ネ(?[[:ネ:]])ネ/' => "",
234 '/ネ(?[ネ])ネ/' => 'Unexpected character {#} m/ネ(?[ネ{#}])ネ/',
235 '/ネ(?[ + [ネ] ])/' => 'Unexpected binary operator \'+\' with no preceding operand {#} m/ネ(?[ +{#} [ネ] ])/',
236@@ -426,8 +428,9 @@ my @death_utf8 = mark_as_utf8(
237 '/(?[ \x{ネ} ])ネ/' => 'Non-hex character {#} m/(?[ \x{ネ{#}} ])ネ/',
238 '/(?[ \p{ネ} ])/' => 'Can\'t find Unicode property definition "ネ" {#} m/(?[ \p{ネ}{#} ])/',
239 '/(?[ \p{ ネ = bar } ])/' => 'Can\'t find Unicode property definition "ネ = bar" {#} m/(?[ \p{ ネ = bar }{#} ])/',
240- '/ネ(?[ \t ]/' => 'Syntax error in (?[...]) in regex m/ネ(?[ \t ]/',
241- '/(?[ \t + \e # ネ This was supposed to be a comment ])/' => 'Syntax error in (?[...]) in regex m/(?[ \t + \e # ネ This was supposed to be a comment ])/',
242+ '/ネ(?[ \t ]/' => "Unexpected ']' with no following ')' in (?[... {#} m/ネ(?[ \\t ]{#}/",
243+ '/(?[ \t + \e # ネ This was supposed to be a comment ])/' =>
244+ "Syntax error in (?[...]) {#} m/(?[ \\t + \\e # ネ This was supposed to be a comment ]){#}/",
245 'm/(*ネ)ネ/' => q<Unknown verb pattern 'ネ' {#} m/(*ネ){#}ネ/>,
246 '/\cネ/' => "Character following \"\\c\" must be printable ASCII",
247 '/\b{ネ}/' => "'ネ' is an unknown bound type {#} m/\\b{ネ{#}}/",
248diff --git a/t/re/regex_sets.t b/t/re/regex_sets.t
249index 92875677be..60a126ba3c 100644
250--- a/t/re/regex_sets.t
251+++ b/t/re/regex_sets.t
252@@ -157,13 +157,13 @@ for my $char ("٠", "٥", "٩") {
253 eval { $_ = '/(?[(\c]) /'; qr/$_/ };
254 like($@, qr/^Syntax error/, '/(?[(\c]) / should not panic');
255 eval { $_ = '(?[\c#]' . "\n])"; qr/$_/ };
256- like($@, qr/^Syntax error/, '/(?[(\c]) / should not panic');
257+ like($@, qr/^Unexpected/, '/(?[(\c]) / should not panic');
258 eval { $_ = '(?[(\c])'; qr/$_/ };
259 like($@, qr/^Syntax error/, '/(?[(\c])/ should be a syntax error');
260 eval { $_ = '(?[(\c]) ]\b'; qr/$_/ };
261- like($@, qr/^Syntax error/, '/(?[(\c]) ]\b/ should be a syntax error');
262+ like($@, qr/^Unexpected/, '/(?[(\c]) ]\b/ should be a syntax error');
263 eval { $_ = '(?[\c[]](])'; qr/$_/ };
264- like($@, qr/^Syntax error/, '/(?[\c[]](])/ should be a syntax error');
265+ like($@, qr/^Unexpected/, '/(?[\c[]](])/ should be a syntax error');
266 like("\c#", qr/(?[\c#])/, '\c# should match itself');
267 like("\c[", qr/(?[\c[])/, '\c[ should match itself');
268 like("\c\ ", qr/(?[\c\])/, '\c\ should match itself');
269--
2702.22.0.vfs.1.1.57.gbaf16c8
271
diff --git a/meta/recipes-devtools/perl/perl_5.24.4.bb b/meta/recipes-devtools/perl/perl_5.24.4.bb
index a644970192..2f27749c53 100644
--- a/meta/recipes-devtools/perl/perl_5.24.4.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.4.bb
@@ -65,6 +65,10 @@ SRC_URI += " \
65 file://perl-5.26.1-guard_old_libcrypt_fix.patch \ 65 file://perl-5.26.1-guard_old_libcrypt_fix.patch \
66 file://CVE-2018-12015.patch \ 66 file://CVE-2018-12015.patch \
67 file://0001-ExtUtils-MM_Unix.pm-fix-race-issues.patch \ 67 file://0001-ExtUtils-MM_Unix.pm-fix-race-issues.patch \
68 file://CVE-2018-18311.patch \
69 file://CVE-2018-18312.patch \
70 file://CVE-2018-18313.patch \
71 file://CVE-2018-18314.patch \
68" 72"
69 73
70# Fix test case issues 74# Fix test case issues