Change-Id: Ideac8eac3ba4ea738961e2e8929d160c18652d7a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4546
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,72 +0,0 @@ |
1 |
-From 8037f71d03b3cd8919248f38448a0a2d3715c18c Mon Sep 17 00:00:00 2001 |
|
2 |
-From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> |
|
3 |
-Date: Fri, 24 Feb 2017 17:30:30 +0000 |
|
4 |
-Subject: [PATCH] Fix Unicode property crash for 32-bit characters greater than |
|
5 |
- 0x10ffff. |
|
6 |
-MIME-Version: 1.0 |
|
7 |
-Content-Type: text/plain; charset=UTF-8 |
|
8 |
-Content-Transfer-Encoding: 8bit |
|
9 |
- |
|
10 |
-git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1688 2f5784b3-3f2a-0410-8824-cb99058d5e15 |
|
11 |
- |
|
12 |
-Petr Písař: Ported to 8.40. |
|
13 |
- |
|
14 |
-diff --git a/pcre_internal.h b/pcre_internal.h |
|
15 |
-index 2923b29..154d3f6 100644 |
|
16 |
-+++ b/pcre_internal.h |
|
17 |
-@@ -2772,6 +2772,9 @@ extern const pcre_uint8 PRIV(ucd_stage1)[]; |
|
18 |
- extern const pcre_uint16 PRIV(ucd_stage2)[]; |
|
19 |
- extern const pcre_uint32 PRIV(ucp_gentype)[]; |
|
20 |
- extern const pcre_uint32 PRIV(ucp_gbtable)[]; |
|
21 |
-+#ifdef COMPILE_PCRE32 |
|
22 |
-+extern const ucd_record PRIV(dummy_ucd_record)[]; |
|
23 |
-+#endif |
|
24 |
- #ifdef SUPPORT_JIT |
|
25 |
- extern const int PRIV(ucp_typerange)[]; |
|
26 |
- #endif |
|
27 |
-@@ -2780,9 +2783,15 @@ extern const int PRIV(ucp_typerange)[]; |
|
28 |
- /* UCD access macros */ |
|
29 |
- |
|
30 |
- #define UCD_BLOCK_SIZE 128 |
|
31 |
--#define GET_UCD(ch) (PRIV(ucd_records) + \ |
|
32 |
-+#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ |
|
33 |
- PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ |
|
34 |
- UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) |
|
35 |
-+ |
|
36 |
-+#ifdef COMPILE_PCRE32 |
|
37 |
-+#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) |
|
38 |
-+#else |
|
39 |
-+#define GET_UCD(ch) REAL_GET_UCD(ch) |
|
40 |
-+#endif |
|
41 |
- |
|
42 |
- #define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype |
|
43 |
- #define UCD_SCRIPT(ch) GET_UCD(ch)->script |
|
44 |
-diff --git a/pcre_ucd.c b/pcre_ucd.c |
|
45 |
-index 69c4fd4..f22f826 100644 |
|
46 |
-+++ b/pcre_ucd.c |
|
47 |
-@@ -38,6 +38,20 @@ const pcre_uint16 PRIV(ucd_stage2)[] = {0}; |
|
48 |
- const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0}; |
|
49 |
- #else |
|
50 |
- |
|
51 |
-+/* If the 32-bit library is run in non-32-bit mode, character values |
|
52 |
-+greater than 0x10ffff may be encountered. For these we set up a |
|
53 |
-+special record. */ |
|
54 |
-+ |
|
55 |
-+#ifdef COMPILE_PCRE32 |
|
56 |
-+const ucd_record PRIV(dummy_ucd_record)[] = {{ |
|
57 |
-+ ucp_Common, /* script */ |
|
58 |
-+ ucp_Cn, /* type unassigned */ |
|
59 |
-+ ucp_gbOther, /* grapheme break property */ |
|
60 |
-+ 0, /* case set */ |
|
61 |
-+ 0, /* other case */ |
|
62 |
-+ }}; |
|
63 |
-+#endif |
|
64 |
-+ |
|
65 |
- /* When recompiling tables with a new Unicode version, please check the |
|
66 |
- types in this structure definition from pcre_internal.h (the actual |
|
67 |
- field names will be different): |
|
68 |
-2.7.4 |
|
69 |
- |
70 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,78 +0,0 @@ |
1 |
-From 3b8f1ab07fb1744c57f5d04c872e81d8d669de87 Mon Sep 17 00:00:00 2001 |
|
2 |
-From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> |
|
3 |
-Date: Fri, 31 Mar 2017 05:41:17 +0000 |
|
4 |
-Subject: [PATCH] Fix character type detection when 32-bit and UCP are enabled |
|
5 |
- but UTF is not in JIT. |
|
6 |
-MIME-Version: 1.0 |
|
7 |
-Content-Type: text/plain; charset=UTF-8 |
|
8 |
-Content-Transfer-Encoding: 8bit |
|
9 |
- |
|
10 |
-git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1693 2f5784b3-3f2a-0410-8824-cb99058d5e15 |
|
11 |
-Signed-off-by: Petr Písař <ppisar@redhat.com> |
|
12 |
- pcre_jit_compile.c | 31 +++++++++++++++++++++++++++++++ |
|
13 |
- 1 file changed, 31 insertions(+) |
|
14 |
- |
|
15 |
-diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c |
|
16 |
-index 1a8ce1e..c9db7ee 100644 |
|
17 |
-+++ b/pcre_jit_compile.c |
|
18 |
-@@ -559,6 +559,8 @@ the start pointers when the end of the capturing group has not yet reached. */ |
|
19 |
- |
|
20 |
- #define READ_CHAR_MAX 0x7fffffff |
|
21 |
- |
|
22 |
-+#define INVALID_UTF_CHAR 888 |
|
23 |
-+ |
|
24 |
- static pcre_uchar *bracketend(pcre_uchar *cc) |
|
25 |
- { |
|
26 |
- SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND)); |
|
27 |
-@@ -3277,10 +3279,30 @@ static void do_getucd(compiler_common *common) |
|
28 |
- /* Search the UCD record for the character comes in TMP1. |
|
29 |
- Returns chartype in TMP1 and UCD offset in TMP2. */ |
|
30 |
- DEFINE_COMPILER; |
|
31 |
-+#ifdef COMPILE_PCRE32 |
|
32 |
-+struct sljit_jump *jump; |
|
33 |
-+#endif |
|
34 |
-+ |
|
35 |
-+#if defined SLJIT_DEBUG && SLJIT_DEBUG |
|
36 |
-+/* dummy_ucd_record */ |
|
37 |
-+const ucd_record *record = GET_UCD(INVALID_UTF_CHAR); |
|
38 |
-+SLJIT_ASSERT(record->script == ucp_Common && record->chartype == ucp_Cn && record->gbprop == ucp_gbOther); |
|
39 |
-+SLJIT_ASSERT(record->caseset == 0 && record->other_case == 0); |
|
40 |
-+#endif |
|
41 |
- |
|
42 |
- SLJIT_ASSERT(UCD_BLOCK_SIZE == 128 && sizeof(ucd_record) == 8); |
|
43 |
- |
|
44 |
- sljit_emit_fast_enter(compiler, RETURN_ADDR, 0); |
|
45 |
-+ |
|
46 |
-+#ifdef COMPILE_PCRE32 |
|
47 |
-+if (!common->utf) |
|
48 |
-+ { |
|
49 |
-+ jump = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0x10ffff + 1); |
|
50 |
-+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, INVALID_UTF_CHAR); |
|
51 |
-+ JUMPHERE(jump); |
|
52 |
-+ } |
|
53 |
-+#endif |
|
54 |
-+ |
|
55 |
- OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT); |
|
56 |
- OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1)); |
|
57 |
- OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK); |
|
58 |
-@@ -5636,6 +5658,15 @@ if (needstype || needsscript) |
|
59 |
- if (needschar && !charsaved) |
|
60 |
- OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0); |
|
61 |
- |
|
62 |
-+#ifdef COMPILE_PCRE32 |
|
63 |
-+ if (!common->utf) |
|
64 |
-+ { |
|
65 |
-+ jump = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0x10ffff + 1); |
|
66 |
-+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, INVALID_UTF_CHAR); |
|
67 |
-+ JUMPHERE(jump); |
|
68 |
-+ } |
|
69 |
-+#endif |
|
70 |
-+ |
|
71 |
- OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT); |
|
72 |
- OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1)); |
|
73 |
- OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK); |
|
74 |
-2.7.4 |
|
75 |
- |
... | ... |
@@ -1,22 +1,18 @@ |
1 | 1 |
Summary: Grep for perl compatible regular expressions |
2 | 2 |
Name: pcre |
3 |
-Version: 8.40 |
|
4 |
-Release: 4%{?dist} |
|
3 |
+Version: 8.41 |
|
4 |
+Release: 1%{?dist} |
|
5 | 5 |
License: BSD |
6 | 6 |
URL: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%{version}.tar.bz2 |
7 | 7 |
Group: Applications/System |
8 | 8 |
Vendor: VMware, Inc. |
9 | 9 |
Distribution: Photon |
10 | 10 |
Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2 |
11 |
-%define sha1 pcre=12f338719b8b028a2eecbf9192fcc00a13fc04f6 |
|
12 |
-#Fixes CVE-2017-7244, CVE-2017-7245, CVE-2017-7246 |
|
13 |
-Patch0: pcre-8.40-Fix-Unicode-property-crash-for-32-bit-characters-gre.patch |
|
14 |
-#Fixes CVE-2017-7186 |
|
15 |
-Patch1: pcre-8.40-Fix-character-type-detection-when-32-bit-and-UCP-are.patch |
|
11 |
+%define sha1 pcre=7d1f4aae4191512744a718cc2b81bcf995ec1437 |
|
16 | 12 |
BuildRequires: bzip2-devel |
17 | 13 |
BuildRequires: readline-devel |
18 | 14 |
Requires: libgcc |
19 |
-Requires: readline |
|
15 |
+Requires: readline |
|
20 | 16 |
Requires: libstdc++ |
21 | 17 |
Requires: pcre-libs = %{version}-%{release} |
22 | 18 |
%description |
... | ... |
@@ -39,8 +35,6 @@ This package contains minimal set of shared pcre libraries. |
39 | 39 |
|
40 | 40 |
%prep |
41 | 41 |
%setup -q |
42 |
-%patch0 -p1 |
|
43 |
-%patch1 -p1 |
|
44 | 42 |
%build |
45 | 43 |
./configure --prefix=/usr \ |
46 | 44 |
--docdir=/usr/share/doc/pcre-%{version} \ |
... | ... |
@@ -67,7 +61,7 @@ make %{?_smp_mflags} check |
67 | 67 |
%postun -p /sbin/ldconfig |
68 | 68 |
%files |
69 | 69 |
%defattr(-,root,root) |
70 |
-%{_bindir}/pcregrep |
|
70 |
+%{_bindir}/pcregrep |
|
71 | 71 |
%{_bindir}/pcretest |
72 | 72 |
%{_mandir}/man1/pcregrep.1* |
73 | 73 |
%{_mandir}/man1/pcretest.1* |
... | ... |
@@ -77,7 +71,7 @@ make %{?_smp_mflags} check |
77 | 77 |
%files devel |
78 | 78 |
%defattr(-, root, root) |
79 | 79 |
%{_bindir}/* |
80 |
-%exclude %{_bindir}/pcregrep |
|
80 |
+%exclude %{_bindir}/pcregrep |
|
81 | 81 |
%exclude %{_bindir}/pcretest |
82 | 82 |
%{_defaultdocdir}/%{name}-%{version}/* |
83 | 83 |
%{_mandir}/*/* |
... | ... |
@@ -91,6 +85,8 @@ make %{?_smp_mflags} check |
91 | 91 |
%{_libdir}/libpcre.so.* |
92 | 92 |
|
93 | 93 |
%changelog |
94 |
+* Wed Dec 20 2017 Xiaolin Li <xiaolinl@vmware.com> 8.41-1 |
|
95 |
+- Update to version 8.41 |
|
94 | 96 |
* Wed Jul 19 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 8.40-4 |
95 | 97 |
- Added fix for CVE-2017-11164 by adding stack recursion limit |
96 | 98 |
* Wed May 24 2017 Divya Thaluru <dthaluru@vmware.com> 8.40-3 |
... | ... |
@@ -112,4 +108,4 @@ make %{?_smp_mflags} check |
112 | 112 |
* Mon Nov 30 2015 Sharath George <sharathg@vmware.com> 8.36-2 |
113 | 113 |
Add symlink for libpcre.so.1 |
114 | 114 |
* Thu Nov 06 2014 Sharath George <sharathg@vmware.com> 8.36-1 |
115 |
- Initial version |
|
115 |
+ Initial version |