rFEM: Efficient Backward edge Protection Using Reversed Forward edge Mappings
In this paper, we propose reversed forward edge mapper (rFEM) a Clang/LLVM compiler based tool, to protect the backward edges of a program's control flow graph (CFG) against runtime control flow hijacking (e.g. code reuse attacks) It protects backward edge transfers in C/C+ originating from virtual and non virtual functions by first statically constructing a precise virtual table hierarchy, with which to form a precise forward edge mapping between callees and non virtual calltargets based on precise function signatures, and then checks each instrumented callee return against the previously computed set at runtime. We have evaluated rFEM using the Chrome browser, NodeJS, Nginx, Memcached, and the SPEC CPU2017 benchmark. Our results show that rFEM enforces less than 2.77 return targets per callee in geomean, even for applications heavily relying on backward edges. rFEM's runtime overhead is less than 1% in geomean for the SPEC CPU2017 benchmark and 3.44% in geomean for the Chrome browser.
ACSAC