[PATCH] D42645: New simple Checker for mmap calls
David CARLIER via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 05:36:08 PST 2018
devnexen added a comment.
Another example with pcre2, more specifically its JIT engine
In file included from /home/dcarlier/Contribs/php-src/ext/pcre/pcre2lib/pcre2_jit_compile.c:78:
In file included from /home/dcarlier/Contribs/php-src/ext/pcre/pcre2lib/sljit/sljitLir.c:261:
/home/dcarlier/Contribs/php-src/ext/pcre/pcre2lib/sljit/sljitExecAllocator.c:102:11: warning: Both PROT_WRITE and PROT_EXEC flags had been set. It can leads to exploitable memory regions, overwritten with malicious code
retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dcarlier/Contribs/php-src/ext/pcre/pcre2lib/pcre2_jit_compile.c:78:
In file included from /home/dcarlier/Contribs/php-src/ext/pcre/pcre2lib/sljit/sljitLir.c:1737:
Repository:
rC Clang
https://reviews.llvm.org/D42645
More information about the cfe-commits
mailing list