Skip to content

Commit ec954a9

Browse files
committed
add sast and fuzzing info
1 parent d02ac27 commit ec954a9

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

content/docs/fuzzing/_index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,27 @@ Many techniques can be leveraged when writing harnesses; we discuss these in the
215215
**Instrumentation runtime:** Instrumentations like [AddressSanitizer]({{% relref 03-asan %}}) or [UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) come with a runtime. A fuzzer must be compatible with the sanitizer for bugs to be detected reliably and feedback implemented efficiently. In memory-safe languages like Go or Rust you are less likely to need sanitizers.
216216

217217
Note, that the two just mentioned sanitizers introduce instrumentation with the goal of finding more bugs. There is also a different class of instrumentations (e.g., [SanitizerCoverage](https://clang.llvm.org/docs/SanitizerCoverage.html)) that provides feedback to the fuzzer during execution. The runtime of the feedback-based instrumentation is usually part of the fuzzer runtime.
218+
219+
## What to fuzz
220+
221+
What type of issues fuzzing can find?
222+
223+
* Crashes and panics
224+
* Memory corruption issues: UAFs, integer overflows, undefined behaviors, buffer overflows, memory leaks etc
225+
226+
* Invariant violations: business logic bugs
227+
* State invariants violations: properties that require statefull fuzzing
228+
229+
* Differentials: cross testing between different implementations of the same functionality
230+
* Cross-platform differentials: testing the same code on different architectures
231+
* Regressions: between different versions of the same code
232+
233+
* Broken logical properties
234+
* Round-trip: `decode(encode(x)) == x`
235+
* Idempotence: `f(f(x)) == f(x)`
236+
* Monotonicity: `x < y → f(x) ≤ f(y)`
237+
* Identity: `f(x, identity) == x`
238+
* Commutativity: `f(x, y) == f(y, x)`
239+
* Associativity: `f(f(x, y), z) == f(x, f(y, z))`
240+
241+
* Race conditions

content/docs/static-analysis/_index.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,62 @@ This section presents several static analysis tools. For each tool, we cover top
1313
- Usage in continuous integration pipelines
1414

1515
{{< section >}}
16+
17+
18+
## Basic theory
19+
20+
Below is an overview of techniques implemented in static analysis tools.
21+
22+
Usually tools support only a subset of the following analyses, with varying degree of precision and completeness. Knowing what are a tool's capabilities is useful in determining it's usefulness.
23+
24+
### Views on a code
25+
26+
* Abstract Syntax Tree (AST)
27+
* Control Flow Graph (CFG)
28+
* Data Flow Graph (DFG)
29+
* Call Graph
30+
* Intermediate Representation (IR)
31+
* Single Static Assignment Form (SSA)
32+
* Use-Definition Chain (use-def)
33+
34+
### Analyses
35+
36+
* AST traversal
37+
* Abstract Interpretation
38+
* Constant Propagation
39+
* Value Range analysis
40+
* Data-Flow analysis
41+
* Train Tracking
42+
* Control-Flow analysis
43+
* Domination relationship
44+
* Reachability
45+
* Hoare logic
46+
* Model checking
47+
* Symbolic execution
48+
* Concolic execution
49+
* Type analysis
50+
* Alias/Pointer/points-to analysis
51+
* Program slicing
52+
* Global value numbering
53+
* Hash consing
54+
55+
### Precision
56+
57+
* Intraprocedural
58+
* Flow-sensitivity (order of statements)
59+
* Path-sensitivity (conditional branches)
60+
61+
* Interprocedural
62+
* Context-sensitivity (Polyvariance)
63+
* Call-site
64+
* Type
65+
* Object
66+
* Context-insensitive
67+
68+
69+
### Properties
70+
71+
* Soundness
72+
* Precision
73+
* Completness
74+
* Execution time

0 commit comments

Comments
 (0)