Fundamental Memory Safety Concepts

PACT: Study one C/C++ memory safety concept each weekday for 2 weeks.

Purpose: Refresh my knowledge on memory safety concepts as a core skill for reviewing C/C++ codebases

Actionable: One concept per weekday, many accessible resouces online.

Continuous: 2 weeks provides enough repetition, daily commitment to build momentum and consistency.

Trackable: Post logged on each concept, simple yes/no.

Observation

My recent work has focused on higher level languages such as Typescript and Java, along with deployments on AWS. Prior I worked with low-level languages such as C/C++ and embedded systems. Having not reviewed C/C++ code bases lately, I would like to refresh my understanding on low-level memory safety concepts.

Hypothesis

Reviewing the following memory safety concepts will help refresh my knowledge and have confidence in reviewing C/C++ code bases.

  1. Buffer Overflow (stack/heap)
  2. Use-After-Free
  3. Null Pointer Dereference
  4. Double Free
  5. Uninitialized Memory
  6. Integer Overflow
  7. Type Confusion
  8. Memory Leaks
  9. Array Bounds Violation
  10. Unsafe Pointer Arithmetic

This is not an exhaustive list of all memory safety concepts. Something that could be tackled in a future (tiny) experiment.

Posts

No posts yet.