[PATCH] D42645: New simple Checker for mmap calls

David CARLIER via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 12:39:11 PST 2018


devnexen added a comment.

In https://reviews.llvm.org/D42645#990771, @a.sidorin wrote:

> Hello David,
>
> Do you have any results of this checker on the real code? If yes, could you please share them?
>  There are also some inline comments regarding implementation.


I did a quick test on the PHP opcache's code :

  warning: Both PROT_WRITE and PROT_EXEC flags had been set. It can leads to exploitable memory regions, overwritten with malicious code
          ret = mmap(start, size, PROT_READ | PROT_WRITE | PROT_EXEC,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ```~~
   


Repository:
  rC Clang

https://reviews.llvm.org/D42645





More information about the cfe-commits mailing list