Algorithm Search⌘K

Techniquecore

Control-flow integrity

Also called CFI.

Checks at each indirect branch that the target is allowed by a control flow graph computed in advance, so hijacked flow stops.

Control-flow integrity (CFI) is a defense that fixes, before the program runs, the set of targets each indirect branch may go to, and checks at run time that every indirect call, jump and return goes to one of them. The allowed sets come from a control flow graph that a compiler or a binary analysis builds: direct branches are fixed in the code, and for each indirect branch site ss the analysis gives a set T(s)T(s) of allowed targets, using points-to analysis or types for calls through pointers and the call graph for returns. A memory error can still change a code pointer or a return address, but if the new target is not in T(s)T(s), the check stops the program before the branch. So code reuse in the style of return-oriented programming, which jumps into the middle of functions, fails. Abadi, Budiu, Erlingsson and Ligatti (CCS 2005) defined CFI and proved its guarantee under three assumptions: code cannot be written, data cannot run, and the labels that mark valid targets appear nowhere else. The guarantee is exactly as strong as the graph is precise. A coarse graph leaves many allowed targets, and even a fully precise static graph leaves enough for general attacks when returns are not checked by a shadow stack, as control-flow bending showed in 2015.

In plain words

A program has a map of the ways it can move from one piece of code to another. Most moves are fixed in the code itself. A few are decided while the program runs: a call through a function pointer, or a return that reads its address from the stack. An attacker who changes those addresses changes where the program goes.

CFI writes down, before the program runs, the allowed destinations of each such move. Then it adds a small check before each move. If the destination is not on the list, the program stops.

The checks are only as good as the lists. If a list allows almost every function, the attacker can still choose among many. And for returns the list says "any place that calls this function", not "the place that called it this time", which is why CFI is paired with a shadow stack.

When it applies

  • The threat is control-flow hijacking: an attacker can change code pointers or return addresses in writable memory, through a buffer overflow or another memory error, but cannot change code.
  • Data execution prevention holds. Code pages are not writable and data pages are not executable, as data execution prevention provides. These are two of the three assumptions of the guarantee.
  • A control flow graph can be built. The compiler has the source, or a binary analysis can find the functions and their indirect branches. The precision of the policy depends on how well the analysis resolves function pointers and virtual calls (class hierarchy analysis, types, points-to analysis).
  • The whole program is instrumented. Every module, including the libraries, must be built or rewritten with checks, or an unchecked module offers free targets.

The template

The defense has a build phase that turns the allowed graph into labels, and a check before each indirect transfer. The named holes are the choices of each system. The build below gives one label to each connected component of the bipartite graph between sites and targets, which is the labeling of Abadi et al.

  1. BUILD-LABELS(allowed sets T(s) for each indirect branch site s)
  2. 1E ← the edges (s, t) with t ∈ T(s), from ⟨graph analysis⟩
  3. 2for each (s, t) in E do UNION(s, t) ▷ union-find over sites and targets
  4. 3give one label to each union-find class ▷ ⟨label encoding⟩ in code
  5. 4at each target t, place label(t) in non-writable code
  6. 5at each site s, store expected(s) ← label of the class of s
  7. CHECK(s, x) ▷ inserted before the branch at s, with run-time target x
  8. 6if x carries no label or label(x) ≠ expected(s) then fault "CFI violation"
  9. 7branch to x

Walk-through. Line L1 is the analysis, which decides precision. Line L2 merges a site with every target it may reach, using a disjoint set structure. If two sites share one target, their whole target sets merge, because one target can carry only one label. Line L3 assigns the labels, and lines L4 and L5 place them: at each target, a label that the check can read from the code, and at each site, the label it expects. Line L6 is the run-time check, a load and a compare. Line L7 is the original branch.

Correctness. Let T∗(s)T^*(s) be the set of targets in the connected component of ss in the bipartite graph of line L1. Under the three assumptions, a transfer from ss to xx passes line L6 if and only if x∈T∗(s)x \in T^*(s). Two consequences follow. First, T(s)⊆T∗(s)T(s) \subseteq T^*(s), so a run that follows the graph never faults. Second, if any two allowed sets are equal or disjoint, then T∗(s)=T(s)T^*(s) = T(s), so the check is exactly the policy. When sets overlap without being equal, the check accepts more than the policy, and no labeling with one label per target can do better. The full proofs are in the proof file.

Example. Take three sites with T(s1)={f,g}T(s_1) = \{f, g\}, T(s2)={g,h}T(s_2) = \{g, h\} and T(s3)={k}T(s_3) = \{k\}. Line L2 joins s1s_1, ff and gg, then s2s_2 and hh through gg, so there are two classes: {s1,s2,f,g,h}\{s_1, s_2, f, g, h\} and {s3,k}\{s_3, k\}. Now run the transfers (s1,g)(s_1, g), (s2,h)(s_2, h), (s1,h)(s_1, h), (s3,f)(s_3, f). The first two follow the graph and pass. The third is not in T(s1)T(s_1), but hh carries the label of s1s_1's class, so it passes: this is the loss of precision from the shared target gg. The fourth fails at line L6, because ff carries the first label and s3s_3 expects the second.

Cost. The build takes O((V+E) α(V))O((V + E)\,\alpha(V)) time in the word RAM model for VV sites and targets and EE allowed edges, and each check takes O(1)O(1). Measured overhead is a different matter. Abadi et al. report an average of 16 percent on SPEC benchmarks for their binary rewriter, with a range of 0 to 45 percent, and 21 percent on average with a protected shadow call stack added (TISSEC 2009). Compiler-based designs since then are cheaper; Burow et al. (2017) compare them.

Code. The Python file impl/python/control_flow_integrity.py builds the labels of lines L1 to L5 from an allowed graph with a union-find, checks transfers at lines L6 and L7, and runs a sequence of abstract transfers. It works on names of sites and targets only, with no machine code. The tests compare the accepted sets with the connected components found by breadth-first search on 700 random graphs.

Classic examples

  • The original design (2005). Abadi et al. rewrote x86 binaries with labels in the code, checked every indirect call, jump and return, and paired the checks with a protected shadow call stack for exact returns. Their guarantee needs non-writable code, non-executable data and unique labels.
  • Stopping return-oriented programming. Sequences used by ROP mostly start in the middle of functions or of instructions. None of these places carry a label, so the first transfer to one fails at line L6.
  • Coarse CFI in practice. Several deployed forms allow any indirect call to reach any function entry that has been marked, and any return to reach any instruction after a call. They are cheap and need no precise analysis, but research in 2014 built general attacks inside such policies. The forward-edge marks of recent processors are of this coarse kind and are meant to be combined with a hardware shadow stack.
  • Control-flow bending (2015). Carlini et al. assumed fully precise static CFI, the most restrictive static policy that does not break the program, and still found powerful attacks in five of six real programs, through functions that are allowed targets and that themselves take pointers, such as copy and formatted output functions. A shadow stack added to CFI removed arbitrary code execution in three of the six.
  • Code-pointer integrity. CPI takes another path: it protects the code pointers themselves, so that their values stay correct, rather than checking their targets against a graph.

Variations

  • Forward edges and backward edges. Indirect calls and jumps (forward edges) are checked against sets from types or points-to analysis. Returns (backward edges) are better checked by a shadow stack, which requires the matching call site rather than any call site.
  • Type-based sets. A compiler can allow an indirect call to reach only functions whose type matches the type of the pointer, and a virtual call to reach only the methods of the class hierarchy of the static type. This is cheap and common; its precision depends on how many functions share a type.
  • More than one label per target. To avoid the merge of line L2, a system can give a target several labels, test the target against a set, or duplicate code. The optimality theorem in the proof file shows that one label per target cannot avoid the loss.
  • Dynamic and context-sensitive CFI. Some designs narrow the allowed set at run time, using the history of the path or the points-to facts that hold at this moment. They come closer to the ideal of one allowed target, at a higher cost.
  • Hardware support. Instruction set extensions mark valid targets of indirect branches and check them in the processor, at little cost, with a coarse policy. Their value comes from the combination with a hardware shadow stack.
  • Relation to inline monitors. CFI is an inline reference monitor for a safety policy on control flow, and it is the base that lets software fault isolation keep its checks from being skipped.

Pitfalls

  • Coarse policies. A policy that allows every function or every call-preceded instruction leaves enough targets for general computation. Report the size of the allowed sets, not only that CFI is on.
  • Returns without a shadow stack. A static policy allows a function to return to any of its callers. The return of a function called from many places can then go to any of them, which control-flow bending uses.
  • Missing the assumptions. If code is writable, the attacker changes the check or the labels. If data can run, the attacker writes a jump with no check. If a label's bit pattern appears elsewhere, that place becomes a target. Each of these voids the theorem.
  • Uninstrumented modules. A library built without CFI, or code generated at run time without checks, gives free targets.
  • Data-only attacks. CFI says nothing about the data the program uses. An attacker who changes a decision variable or the arguments of an allowed call stays inside the graph; see data-oriented programming.

Code

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

control_flow_integrity.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/control-flow-integrity/. The authors are listed in prov/EYC3KG.jsonl.

"""Label-based control-flow integrity on an abstract control flow graph.

The model has no machine code and no real addresses. A branch site and a
target are hashable names, such as "s1" and "f". The allowed graph maps each
indirect branch site to the set of targets that the analysis allows for it.
The labels are kept in a separate object that the modeled program cannot
write, which models labels placed in non-writable code.
"""

from collections.abc import Hashable, Iterable, Mapping


class CFIViolation(Exception):
    """Raised by check when the target does not carry the label of the site."""

    def __init__(self, site: Hashable, target: Hashable) -> None:
        super().__init__(f"CFI violation at {site!r} to {target!r}")
        self.site = site
        self.target = target


class _UnionFind:
    """Disjoint sets over hashable keys, with path halving and union by size."""

    def __init__(self) -> None:
        self._parent: dict[Hashable, Hashable] = {}
        self._size: dict[Hashable, int] = {}

    def add(self, x: Hashable) -> None:
        if x not in self._parent:
            self._parent[x] = x
            self._size[x] = 1

    def find(self, x: Hashable) -> Hashable:
        p = self._parent
        while p[x] != x:
            p[x] = p[p[x]]
            x = p[x]
        return x

    def union(self, a: Hashable, b: Hashable) -> None:
        ra, rb = self.find(a), self.find(b)
        if ra == rb:
            return
        if self._size[ra] < self._size[rb]:
            ra, rb = rb, ra
        self._parent[rb] = ra
        self._size[ra] += self._size[rb]


class CFILabels:
    """The labels of a CFI instrumentation, computed once from an allowed graph.

    Build cost: O((V + E) alpha(V)) for V sites and targets and E allowed
    edges, with a union-find. Each check costs O(1) expected time (two
    dictionary lookups). Precondition: allowed maps every indirect branch site
    of the program to a finite set of targets; the site and target names are
    disjoint or are tagged so that they cannot collide.
    """

    def __init__(self, allowed: Mapping[Hashable, Iterable[Hashable]]) -> None:
        edges = {s: frozenset(ts) for s, ts in allowed.items()}  # @line L1
        uf = _UnionFind()
        for s, ts in edges.items():  # @line L2
            uf.add(("site", s))  # @line L2
            for t in ts:  # @line L2
                uf.add(("target", t))  # @line L2
                uf.union(("site", s), ("target", t))  # @line L2
        names: dict[Hashable, int] = {}
        self._target_label: dict[Hashable, int] = {}
        self._site_label: dict[Hashable, int] = {}
        for s, ts in edges.items():
            for t in ts:
                root = uf.find(("target", t))  # @line L3
                label = names.setdefault(root, len(names))  # @line L3
                self._target_label[t] = label  # @line L4
        for s in edges:
            root = uf.find(("site", s))  # @line L3
            self._site_label[s] = names.setdefault(root, len(names))  # @line L5
        self._edges = edges

    def check(self, site: Hashable, target: Hashable) -> Hashable:
        """Return target if it carries the label of site, else raise CFIViolation."""
        expected = self._site_label.get(site)
        if expected is None or self._target_label.get(target) != expected:  # @line L6
            raise CFIViolation(site, target)  # @line L6
        return target  # @line L7

    def label_of_site(self, site: Hashable) -> int:
        return self._site_label[site]

    def label_of_target(self, target: Hashable) -> int | None:
        return self._target_label.get(target)

    def effective_targets(self, site: Hashable) -> frozenset[Hashable]:
        """The set of targets that check accepts for site."""
        lab = self._site_label[site]
        return frozenset(t for t, l in self._target_label.items() if l == lab)

    def number_of_labels(self) -> int:
        return len(set(self._site_label.values()) | set(self._target_label.values()))


def run_transfers(
    labels: CFILabels, transfers: Iterable[tuple[Hashable, Hashable]]
) -> tuple[list[Hashable], int | None]:
    """Run a sequence of indirect transfers (site, target) under the checks.

    Returns the targets reached before the first violation and the index of the
    violating transfer, or None if every transfer passes. O(1) expected time per
    transfer.
    """
    reached: list[Hashable] = []
    for i, (s, t) in enumerate(transfers):
        try:
            reached.append(labels.check(s, t))
        except CFIViolation:
            return reached, i
    return reached, None
test_control_flow_integrity.py 146 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/control-flow-integrity/. The authors are listed in prov/EYC3KG.jsonl.

import random
from collections import deque

import pytest

from control_flow_integrity import CFILabels, CFIViolation, run_transfers

EXAMPLE = {"s1": {"f", "g"}, "s2": {"g", "h"}, "s3": {"k"}}


def bipartite(allowed: dict) -> dict:
    adj: dict = {}
    for s, ts in allowed.items():
        adj.setdefault(("site", s), set())
        for t in ts:
            adj[("site", s)].add(("target", t))
            adj.setdefault(("target", t), set()).add(("site", s))
    return adj


def reach(adj: dict, start) -> set:
    seen = {start}
    queue = deque([start])
    while queue:
        u = queue.popleft()
        for v in adj[u]:
            if v not in seen:
                seen.add(v)
                queue.append(v)
    return seen


def oracle_components(allowed: dict) -> dict:
    """Map each site to the set of targets in its connected component, by BFS."""
    adj = bipartite(allowed)
    return {
        s: frozenset(name for kind, name in reach(adj, ("site", s)) if kind == "target")
        for s in allowed
    }


def oracle_component_count(allowed: dict) -> int:
    adj = bipartite(allowed)
    seen: set = set()
    count = 0
    for u in adj:
        if u not in seen:
            count += 1
            seen |= reach(adj, u)
    return count


def random_graph(rng: random.Random) -> dict:
    n_sites = rng.randint(1, 5)
    n_targets = rng.randint(1, 6)
    targets = [f"t{j}" for j in range(n_targets)]
    return {f"s{i}": set(rng.sample(targets, rng.randint(0, min(3, n_targets)))) for i in range(n_sites)}


def test_example_of_the_page() -> None:
    labels = CFILabels(EXAMPLE)
    trace = [("s1", "g"), ("s2", "h"), ("s1", "h"), ("s3", "f"), ("s3", "k")]
    assert run_transfers(labels, trace) == (["g", "h", "h"], 3)
    assert labels.effective_targets("s1") == frozenset({"f", "g", "h"})
    assert labels.effective_targets("s3") == frozenset({"k"})
    assert labels.number_of_labels() == 2


def test_no_false_alarm_on_allowed_edges() -> None:
    labels = CFILabels(EXAMPLE)
    for s, ts in EXAMPLE.items():
        for t in ts:
            assert labels.check(s, t) == t


def test_unknown_site_or_target_faults() -> None:
    labels = CFILabels(EXAMPLE)
    with pytest.raises(CFIViolation):
        labels.check("s9", "f")
    with pytest.raises(CFIViolation):
        labels.check("s1", "data")


def test_site_with_no_targets_always_faults() -> None:
    labels = CFILabels({"s1": set(), "s2": {"f"}})
    with pytest.raises(CFIViolation):
        labels.check("s1", "f")
    assert labels.effective_targets("s1") == frozenset()


def test_precise_when_sets_are_disjoint_or_equal() -> None:
    allowed = {"a": {"f", "g"}, "b": {"f", "g"}, "c": {"h"}, "d": {"k", "m"}}
    labels = CFILabels(allowed)
    for s, ts in allowed.items():
        assert labels.effective_targets(s) == frozenset(ts)
    assert labels.number_of_labels() == 3


def test_random_graphs_against_bfs_oracle() -> None:
    rng = random.Random(4011)
    for _ in range(700):
        allowed = random_graph(rng)
        labels = CFILabels(allowed)
        comps = oracle_components(allowed)
        all_targets = {t for ts in allowed.values() for t in ts} | {"t_none"}
        for s in allowed:
            assert set(allowed[s]) <= comps[s]
            assert labels.effective_targets(s) == comps[s]
            for t in all_targets:
                accepted = True
                try:
                    labels.check(s, t)
                except CFIViolation:
                    accepted = False
                assert accepted == (t in comps[s])


def test_label_count_equals_components() -> None:
    rng = random.Random(77)
    for _ in range(500):
        allowed = random_graph(rng)
        labels = CFILabels(allowed)
        assert labels.number_of_labels() == oracle_component_count(allowed)


def test_random_transfer_sequences() -> None:
    rng = random.Random(1305)
    for _ in range(600):
        allowed = random_graph(rng)
        labels = CFILabels(allowed)
        comps = oracle_components(allowed)
        sites = list(allowed)
        targets = sorted({t for ts in allowed.values() for t in ts} | {"x"})
        trace = [(rng.choice(sites), rng.choice(targets)) for _ in range(rng.randint(0, 8))]
        expected_reached = []
        expected_index = None
        for i, (s, t) in enumerate(trace):
            if t in comps[s]:
                expected_reached.append(t)
            else:
                expected_index = i
                break
        assert run_transfers(labels, trace) == (expected_reached, expected_index)

Exercises

  1. Run the build of the template on T(s1)={a}T(s_1) = \{a\}, T(s2)={a,b}T(s_2) = \{a, b\}, T(s3)={b,c}T(s_3) = \{b, c\}, T(s4)={d}T(s_4) = \{d\}. List the classes and the effective sets T∗(s)T^*(s), and give one transfer that the policy forbids but the check accepts.
  2. Prove that if each target belongs to at most one allowed set, then T∗(s)=T(s)T^*(s) = T(s) for every site. Is the converse true?
  3. A function FF is called from mm call sites. Under a static CFI policy for returns, how many targets does a return of FF have? How many does a shadow stack allow?
  4. Explain, with the three assumptions of the guarantee, why an attacker who can write one byte of a code page can defeat a check at line L6.
Proof: Label-based CFI accepts exactly the targets in the component of the site, and no labeling with one label per target does betterfull

The model. The allowed graph gives, for each indirect branch site ss of a set SS, a finite set T(s)T(s) of allowed targets. Let GG be the bipartite graph with a node for each site and each target that appears in some T(s)T(s), and an edge {s,t}\{s, t\} for each t∈T(s)t \in T(s). For a site ss, let T∗(s)T^*(s) be the set of targets in the connected component of ss in GG. A run of the program is a sequence of transfers (s,x)(s, x), where xx is the target that the branch at ss computes at run time, from data that an attacker may control.

Assumptions. These are the model forms of the assumptions of Abadi et al. (A1) Non-writable code: after lines L1 to L5 run, nothing in the run changes the label of a target or the expected label of a site. (A2) Complete mediation: every indirect transfer of the run goes through CHECK at lines L6 and L7. (A3) Unique labels: a place that is not a target of GG carries no label, so it never matches; in machine code this is the requirement that the bit pattern of a label appears nowhere else in the code, and that data cannot run.

Invariant of lines L1 to L3 (U). After each union of line L2, two nodes have the same union-find root if and only if they are connected in the subgraph of GG formed by the edges added so far.

Proof of (U), by induction on the number of edges added. Before any edge, each node is its own root and is connected only to itself. Adding the edge {s,t}\{s, t\} joins the classes of ss and tt into one, which is exactly what the edge does to the connected components: two nodes are connected after the edge if and only if they were connected before, or one was connected to ss and the other to tt. Path halving and union by size change the shape of the trees but not the sets they hold. □\square

Lemma (labels). After lines L3 to L5, a target tt and a site ss have the same label if and only if t∈T∗(s)t \in T^*(s).

Proof. When the loop of line L2 ends, every edge of GG has been added, so by (U) two nodes have the same root if and only if they are in the same component of GG. Line L3 gives one fresh integer to each root, the same one each time the root comes up, so two nodes have the same label if and only if they have the same root. Lines L4 and L5 store these labels for targets and sites. □\square

Theorem (correctness of CHECK). Under (A1), (A2) and (A3), a transfer (s,x)(s, x) passes line L6 if and only if x∈T∗(s)x \in T^*(s). So every transfer of the run that reaches line L7 goes to a target in T∗(s)T^*(s).

Proof. By (A1) the labels at the time of the transfer are those of the lemma. If xx is a target of GG, it passes line L6 exactly when its label equals the label of ss, which by the lemma is exactly when x∈T∗(s)x \in T^*(s). If xx is not a target of GG, it carries no label by (A3), so it fails line L6, and indeed x∉T∗(s)x \notin T^*(s). If ss is not a site of the graph, line L6 fails for every xx. By (A2) no transfer skips the check. □\square

Corollary 1 (no false alarm). T(s)⊆T∗(s)T(s) \subseteq T^*(s), since each t∈T(s)t \in T(s) is joined to ss by an edge. So a run that follows the allowed graph never faults.

Corollary 2 (precision when sets do not overlap partly). If for every two sites ss and s′s' the sets T(s)T(s) and T(s′)T(s') are equal or disjoint, then T∗(s)=T(s)T^*(s) = T(s) for every site ss.

Proof. If T(s)T(s) is empty, ss is alone in its component, and T∗(s)=∅T^*(s) = \emptyset. Otherwise, take a path in GG from ss to any node of its component. It alternates sites and targets: s=s0,t1,s1,t2,s2,…s = s_0, t_1, s_1, t_2, s_2, \ldots. Each target tit_i lies in both T(si−1)T(s_{i-1}) and T(si)T(s_i), so these sets are not disjoint, hence equal. By induction along the path, every site on it has the set T(s)T(s), and every target on it is in T(s)T(s). So the targets of the component are exactly T(s)T(s). □\square

Theorem (optimality). Let λ\lambda be any labeling that gives one label to each target and one expected label to each site, accepts a transfer (s,x)(s, x) exactly when λ(x)=λ(s)\lambda(x) = \lambda(s), and accepts every allowed edge. Then λ\lambda accepts every edge (s,x)(s, x) with x∈T∗(s)x \in T^*(s). So no labeling of this form is more precise than the one of lines L1 to L5.

Proof. For every edge {s,t}\{s, t\} of GG, λ\lambda accepts (s,t)(s, t), so λ(s)=λ(t)\lambda(s) = \lambda(t). So λ\lambda is constant along every path of GG, hence on every component. For x∈T∗(s)x \in T^*(s), xx and ss are in one component, so λ(x)=λ(s)\lambda(x) = \lambda(s), and (s,x)(s, x) is accepted. □\square

The optimality theorem is the formal reason that one label per target loses precision when allowed sets overlap without being equal: the effective set of a site grows to its whole component. Avoiding the loss needs more than one label per target, a different check, or a duplicate of the target code.

What the theorems do not say. They are statements about the transfers the graph covers, and only under (A1) to (A3). They do not say that T(s)T(s) itself is small; that depends on the analysis that built the graph. They do not say which element of T∗(s)T^*(s) a transfer goes to, so an attacker who controls the target data can still choose among them; control-flow bending shows how much that leaves. For returns, T(s)T(s) is the set of all call sites of the function, so a shadow stack is needed to require the matching one.

Termination and cost. Lines L1 to L5 run a fixed number of loops over the VV nodes and EE edges of GG; with path halving and union by size, the union-find operations cost O(α(V))O(\alpha(V)) amortized each, so the build takes O((V+E) α(V))O((V + E)\,\alpha(V)) steps. Line L6 does two lookups, O(1)O(1) expected time with hash tables. Every loop is over a finite set, so the build ends, and each check ends after a fixed number of steps. ■\blacksquare

References

  1. Martin Abadi, Mihai Budiu, Ulfar Erlingsson and Jay Ligatti, Control-flow integrity, CCS 2005, pages 340-353, the definition of CFI, the label instrumentation, and the assumptions of unique labels, non-writable code and non-executable data
  2. Martin Abadi, Mihai Budiu, Ulfar Erlingsson and Jay Ligatti, Control-flow integrity, principles, implementations, and applications, ACM Transactions on Information and System Security 13(1), article 4, 2009, pages 1-40, the formal model and the proof of the guarantee, the loss of precision from shared labels, and the measured overhead on SPEC benchmarks with and without a protected shadow call stack
  3. Nathan Burow, Scott A. Carr, Joseph Nash, Per Larsen, Michael Franz, Stefan Brunthaler and Mathias Payer, Control-flow integrity, precision, security, and performance, ACM Computing Surveys 50(1), article 16, 2017, pages 1-33, the classification of CFI designs by the precision of the forward and backward edges, and the comparison of their security and cost
  4. Nicholas Carlini, Antonio Barresi, Mathias Payer, David Wagner and Thomas R. Gross, Control-flow bending, on the effectiveness of control-flow integrity, 24th USENIX Security Symposium, 2015, pages 161-176, the results under fully precise static CFI with and without a shadow stack

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH2 full proof
  • correctness: no review record reviews/EYC3KG/proof-correctness.yaml
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • five exercises