소스 검색

pcre: fix CVE-2015-3210

 - should fix eap buffer overflow in pcre_compile2() / compile_regex()

Signed-off-by: heil <heil@terminal-consulting.de>
heil 9 년 전
부모
커밋
183ec8af2e
2개의 변경된 파일33개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      libs/pcre/Makefile
  2. 32
    0
      libs/pcre/patches/100-pcre-cve-2015-3210.patch

+ 1
- 1
libs/pcre/Makefile 파일 보기

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=pcre
11 11
 PKG_VERSION:=8.37
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 15
 PKG_SOURCE_URL:=@SF/pcre

+ 32
- 0
libs/pcre/patches/100-pcre-cve-2015-3210.patch 파일 보기

@@ -0,0 +1,32 @@
1
+Index: pcre-8.37/pcre_compile.c
2
+===================================================================
3
+--- a/pcre_compile.c
4
++++ b/pcre_compile.c
5
+@@ -7177,14 +7177,26 @@
6
+           number. If the name is not found, set the value to 0 for a forward
7
+           reference. */
8
+ 
9
++          recno = 0;
10
+           ng = cd->named_groups;
11
+           for (i = 0; i < cd->names_found; i++, ng++)
12
+             {
13
+             if (namelen == ng->length &&
14
+                 STRNCMP_UC_UC(name, ng->name, namelen) == 0)
15
+-              break;
16
++              {
17
++              open_capitem *oc;
18
++              recno = ng->number;
19
++              if (is_recurse) break;
20
++              for (oc = cd->open_caps; oc != NULL; oc = oc->next)         
21
++                {          
22
++                if (oc->number == recno)                                     
23
++                  {               
24
++                  oc->flag = TRUE;                                      
25
++                  break;
26
++                  }                                                         
27
++                }                          
28
++              }    
29
+             }
30
+-          recno = (i < cd->names_found)? ng->number : 0;
31
+ 
32
+           /* Count named back references. */