<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            Null Dereference

            ABSTRACT

            該程序可能會間接引用一個 null 指針,從而引起 segmentation fault。

            EXPLANATION

            當違反程序員的一個或多個假設時,通常會出現 null 指針異常。如果程序明確將指針設置為 null,但稍后卻間接引用該指針,則將出現 dereference-after-store 錯誤。此錯誤通常是因為程序員在聲明變量時將變量初始化為 null。


            大部分空指針問題只會引起一般的軟件可靠性問題,但如果攻擊者能夠故意觸發空指針間接引用,該攻擊者就有可能利用引發的異常繞過安全邏輯,或致使應用程序泄漏調試信息,這些調試信息對于規劃隨后的攻擊具有利用價值。

            示例:在下列代碼中,程序員將變量 ptr 明確設置為 NULL。稍后,程序員間接引用 ptr,而未檢查對象是否為 null 值。


            *ptr = NULL;
            ...
            ptr->field = val;
            ...
            }

            REFERENCES

            [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A9 Application Denial of Service

            [2] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP6080 CAT II

            [3] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP6080 CAT II

            [4] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 476

            [5] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.9


            Copyright 2013 Fortify Software - All rights reserved.
            (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
            desc.controlflow.cpp.null_dereference_dereference_after_store

            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      亚洲欧美在线