diff options
| author | Dr. Koutheir Attouchi <koutheir@gmail.com> | 2020-08-20 18:54:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-20 18:54:40 -0400 |
| commit | 6fca004ba9645b2c1d4a51ddbbac0c89dd2133d5 (patch) | |
| tree | 536f67d678dc399d50231134d3d4ff26c95dcc8f | |
| parent | e15510ca33ea15c893b78710101c962b11459963 (diff) | |
| download | rust-6fca004ba9645b2c1d4a51ddbbac0c89dd2133d5.tar.gz rust-6fca004ba9645b2c1d4a51ddbbac0c89dd2133d5.zip | |
Another motivation for CFG: return-oriented programming
| -rw-r--r-- | src/doc/unstable-book/src/compiler-flags/control-flow-guard.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md b/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md index 4115825e920..8f53f69b5c5 100644 --- a/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md +++ b/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md @@ -19,8 +19,9 @@ CFG functionality is completely implemented in the LLVM backend and is supported ## When to use Control Flow Guard -The primary motivation for enabling CFG in Rust is to enhance security when linking against non-Rust code, especially C/C++ code. To achieve full CFG protection, all indirect calls (including any from Rust code) must have the appropriate CFG checks, as added by this flag. CFG can also improve security for Rust code that uses the `unsafe` keyword +The primary motivation for enabling CFG in Rust is to enhance security when linking against non-Rust code, especially C/C++ code. To achieve full CFG protection, all indirect calls (including any from Rust code) must have the appropriate CFG checks, as added by this flag. CFG can also improve security for Rust code that uses the `unsafe` keyword. +Another motivation behind CFG is to harden programs against [return-oriented programming (ROP)](https://en.m.wikipedia.org/wiki/Return-oriented_programming) attacks. CFG disallows an attacker from taking advantage of the programs own instructions while redirecting control flow in unexpected ways. ## Overhead of Control Flow Guard |
