This repository demonstrates a potential buffer overflow vulnerability in assembly code and shows how to mitigate it using bounds checking. The bug.asm
file contains the vulnerable code, while bugSolution.asm
presents a corrected version. The vulnerability arises from the lack of bounds checking before accessing memory, making the program susceptible to exploitation if the value of ecx
is maliciously manipulated. The solution adds bounds checking to ensure that memory access remains within the allocated region.
-
Notifications
You must be signed in to change notification settings - Fork 0
Bug-Hunter-X/Potential-Buffer-Overflow-in-Assembly-Code
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Assembly code error: potential buffer overflow. The instruction `mov eax, [ebx+ecx*4]` might read beyond allocated memory if `ecx` is not properly validated.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published