[pcre-dev] [Bug 1988] New: PCRE2 10.23-RC1 - Global out of b…

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1988] New: PCRE2 10.23-RC1 - Global out of bounds read in _pcre2_xclass_8()
https://bugs.exim.org/show_bug.cgi?id=1988

            Bug ID: 1988
           Summary: PCRE2 10.23-RC1 - Global out of bounds read in
                    _pcre2_xclass_8()
           Product: PCRE
           Version: N/A
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: ph10@???
          Reporter: fumfi.255@???
                CC: pcre-dev@???


Created attachment 952
--> https://bugs.exim.org/attachment.cgi?id=952&action=edit
POC to trigger global out of bounds read (pcre2test)

Affected:
- PCRE2 version 10.23-RC1 2016-08-01 (SVN revision: 610)

To reproduce the problem (pcre2test):
pcre2test pcre2_goobr_pcre2_xclass_8 /dev/null

ASAN Output:

==18541==ERROR: AddressSanitizer: global-buffer-overflow on address
0x7fb410237e20 at pc 0x7fb410219aac bp 0x7ffd529a5500 sp 0x7ffd529a54f8
READ of size 2 at 0x7fb410237e20 thread T0
    #0 0x7fb410219aab in _pcre2_xclass_8 XYZ/pcre/src/pcre2_xclass.c:136:30
    #1 0x7fb4101c3ae1 in match XYZ/pcre/src/pcre2_match.c:3258:14
    #2 0x7fb4101a12b3 in pcre2_match_8 XYZ/pcre/src/pcre2_match.c:6992:8
    #3 0x4ef4cc in process_data XYZ/pcre/src/pcre2test.c:6576:9
    #4 0x4ef4cc in main XYZ/pcre/src/pcre2test.c:7788
    #5 0x7fb40f03882f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #6 0x41aad8 in _start (/usr/local/bin/pcre2test+0x41aad8)


0x7fb410237e20 is located 1280 bytes to the right of global variable
'_pcre2_ucd_stage2_8' defined in 'src/pcre2_ucd.c:1379:16' (0x7fb410228d20) of
size 60416
SUMMARY: AddressSanitizer: global-buffer-overflow
XYZ/pcre/src/pcre2_xclass.c:136:30 in _pcre2_xclass_8
Shadow bytes around the buggy address:
  0x0ff70203ef70: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203ef80: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203ef90: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203efa0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203efb0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
=>0x0ff70203efc0: f9 f9 f9 f9[f9]f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203efd0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203efe0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203eff0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203f000: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ff70203f010: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==18541==ABORTING


Regards,
Kamil Frankowicz

--
You are receiving this mail because:
You are on the CC list for the bug.