Learn about the impact of stack buffer overflows
Introduction
Introduction: "Smashing the stack"
Docker Setup
Frame Layout
Stack Buffer Overflow
Redirect control flow
Answers to exercises
Next Steps
Learn about the impact of stack buffer overflows
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
ASLR randomizes addresses and blocks the reproducible redirection needed for these experiments. The Dockerfile writes a
sysctl configuration to disable ASLR so the stack layout and addresses stay predictable.Check that Clang and GDB are available in the container and that
/etc/sysctl.d/01-disable-aslr.conf exists. You need these conditions to keep addresses stable across runs.Use the stack-frame exercise to reason from the local buffer to the saved return address and derive the offset. Then, craft input that pads up to that offset before appending the value you intend to write.
You should observe that writing past the end of the local buffer affects data beyond that buffer, including the saved return address.
Re-check the calculated offset and the exact bytes you wrote for the target return address. Also ensure the example code matches the provided text and that ASLR is disabled as configured in the container.