CWE-785: Use of Path Manipulation Function without Maximum-sized Buffer

ID CWE-785
Abstraction Variant
Structure Simple
Status Incomplete
The product invokes a function for normalizing paths or file names, but it provides an output buffer that is smaller than the maximum possible size, such as PATH_MAX.

Passing an inadequately-sized output buffer to a path manipulation function can result in a buffer overflow. Such functions include realpath(), readlink(), PathAppend(), and others.

Modes of Introduction

Phase Note
Implementation

Applicable Platforms

Type Class Name Prevalence
Language C
Language C++

Relationships

View Weakness
# ID View Status # ID Name Abstraction Structure Status
CWE-1000 Research Concepts Draft CWE-676 Use of Potentially Dangerous Function Base Simple Draft
CWE-1000 Research Concepts Draft CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') Base Simple Incomplete
CWE-700 Seven Pernicious Kingdoms Incomplete CWE-20 Improper Input Validation Class Simple Stable
Loading...
Loading...