CWE一覧に戻る
CWE-226

再利用前に除去されなかった資源中の機密情報

Sensitive Information in Resource Not Removed Before Reuse
脆弱性 レビュー中
JA

製品はメモリやファイルなどのリソースを解放し、再利用できるようにするが、製品がクリティカルな状態遷移を実行したり、他のエンティティがリソースを再利用できるようにする前に、リソースに含まれる情報を消去したり「ゼロ化」したりはしない。

リソースが解放されると、再利用が可能になる。例えば、メモリが割り当て解除された後、オペレーティング・システムはそのメモリを別のプロセスで利用できるようにしたり、ファイルが削除されたときにディスク領域を再割り当てしたりすることができる。情報の削除には時間と追加リソースが必要なため、オペレーティング・システムは通常、以前に書き込まれた情報を消去しない。

同じプロセスによってリソースが再利用される場合でも、新しいデータが古いデータほど大きくなく、古いデータの一部がまだ利用可能なまま残っている場合に、この弱点が生じることがある。データの長さは可変だが、関連するデータ構造は可変ではない場合にも、同様のエラーが発生する可能性がある。使用後にメモリがクリアされない場合、メモリが再割り当てされたときに、信頼性の低い関係者によって情報が読み取られる可能性がある。

この弱点は、デバイスやシステムが通常動作中に電源状態、スリープ状態、デバッグ状態の間で切り替わる時や、実行が異なるユーザーや特権レベルに変わる時など、ハードウェアで適用される可能性がある。

EN

The product releases a resource such as memory or a file so that it can be made available for reuse, but it does not clear or "zeroize" the information contained in the resource before the product performs a critical state transition or makes the resource available for reuse by other entities.

When resources are released, they can be made available for reuse. For example, after memory is de-allocated, an operating system may make the memory available to another process, or disk space may be reallocated when a file is deleted. As removing information requires time and additional resources, operating systems do not usually clear the previously written information.

Even when the resource is reused by the same process, this weakness can arise when new data is not as large as the old data, which leaves portions of the old data still available. Equivalent errors can occur in other situations where the length of data is variable but the associated data structure is not. If memory is not cleared after use, the information may be read by less trustworthy parties when the memory is reallocated.

This weakness can apply in hardware, such as when a device or system switches between power, sleep, or debug states during normal operation, or when execution changes to different users or privilege levels.

Scope: Confidentiality / Impact: Read Application Data
During critical state transitions, information not needed in the next state should be removed or overwritten with fixed patterns (such as all 0's) or random data, before the transition to the next state.
When releasing, de-allocating, or deleting a resource, overwrite its data and relevant metadata with fixed patterns or random data. Be cautious about complex resource types whose underlying representation might be non-contiguous or change at a low level, such as how a file might be split into different chunks on a file system, even though "logical" file positions are contiguous at the application layer. Such resource types might require invocation of special modes or APIs to tell the underlying operating system to perform the necessary clearing, such as SDelete (Secure Delete) on Windows, although the appropriate functionality might not be available at the application layer.
MITRE公式ページ — CWE-226