CWE一覧に戻る
CWE-785

最大サイズのバッファを持たないパス操作機能の使用

Use of Path Manipulation Function without Maximum-sized Buffer
脆弱性 作成中
JA

この製品は、パスやファイル名を正規化する関数を呼び出すが、PATH_MAXのような可能な最大サイズよりも小さい出力バッファを提供する。

パス操作関数に不適切なサイズの出力バッファを渡すと、バッファ・オーバーフローを引き起こす可能性がある。このような関数には、realpath()、readlink()、PathAppend()などがある。

EN

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.

Scope: Integrity, Confidentiality, Availability / Impact: Modify Memory; Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart
Always specify output buffers large enough to handle the maximum-size possible result from path manipulation functions.
MITRE公式ページ — CWE-785