CWE一覧に戻る
CWE-14

バッファをクリアするコードのコンパイラによる削除

Compiler Removal of Code to Clear Buffers
脆弱性 レビュー中
JA

センシティブなメモリはソースコードに従ってクリアされるが、コンパイラの最適化によって、そのメモリが再び読み出されない場合はそのままにされる。

このコンパイラ最適化エラーは、以下の場合に発生する:

EN

Sensitive memory is cleared according to the source code, but compiler optimizations leave the memory untouched when it is not read from again, aka "dead store removal."

This compiler optimization error occurs when:

Scope: Confidentiality, Access Control / Impact: Read Memory; Bypass Protection Mechanism
Store the sensitive data in a "volatile" memory location if available.
If possible, configure your compiler so that it does not remove dead stores.
Where possible, encrypt sensitive data that are used by a software system.
MITRE公式ページ — CWE-14