Memory safety notes
Software defenses
Languages, sanitizers, fuzzing, and exploit mitigations in a layered design.
Background & research notes · AGIACC
Technical note. Software controls remain essential in systems that also use hardware protection.
Prevent, detect, and contain#
A memory-safe language can prevent many classes of memory misuse within its safety model. Native dependencies and unsafe interfaces still need review. Fuzzing and static analysis help explore errors, but test coverage is not proof that all inputs are safe.
AddressSanitizer instruments code to detect memory errors including many out-of-bounds and use-after-free accesses. Its coverage and resource costs depend on the build and workload. Control-flow integrity constrains selected indirect transfers and has its own compilation and linking requirements.
Evaluate the whole boundary#
A useful evaluation states which code is instrumented, which components are trusted, how a violation is handled, and the effect on the application. Hardware and software methods should be compared on those properties rather than a universal overhead figure.
Next: Hardware-assisted approaches.