CWE-121

GPTKB entity

Statements (21)
Predicate Object
gptkbp:instance_of gptkb:Common_Weakness_Enumeration
gptkbp:bfsLayer 6
gptkbp:bfsParent gptkb:CWE-74
gptkbp:category Buffer Errors
gptkbp:difficulty gptkb:High
gptkbp:example Using strcpy() without checking the length of the input.
https://www.w3.org/2000/01/rdf-schema#label CWE-121
gptkbp:impact Can lead to arbitrary code execution.
gptkbp:is_described_as A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated for.
gptkbp:is_often_used_in gptkb:language
Assembly language
C++ programming language
gptkbp:is_protected_by Employ Data Execution Prevention (DEP).
Implement stack canaries.
Use Address Space Layout Randomization (ASLR).
Use safer functions like strncpy() or implement bounds checking.
gptkbp:is_referenced_in https://cwe.mitre.org/data/definitions/121.html
gptkbp:name Stack-based Buffer Overflow
gptkbp:related_to gptkb:CWE-119
gptkb:CWE-130
gptkb:CWE-787