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

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

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

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

            Use After Free

            ABSTRACT

            在釋放內存后對其進行引用會導致程序崩潰。

            EXPLANATION

            當程序持續使用某個已釋放的指針時,就會發生 use after free 錯誤。就像 double free 和 memory leak 錯誤一樣,use after free 錯誤有以下兩種情況,有時這兩種情況會同時發生:

            - 錯誤狀況及其他異常情況。

            — 不清楚由程序的哪一部分負責釋放內存

            Use after free 錯誤有時對程序來說是沒有任何影響的,但有時會造成程序的崩潰。目前技術上可以對釋放的內存空間進行重新分配,而攻擊者可以利用這一點,發動 buffer overflow 攻擊,同時我們對此類攻擊并不會有任何察覺。

            示例:以下代碼舉例說明了一個 use after free 錯誤:


            char* ptr = (char*)malloc (SIZE);
            ...
            if (err) {
            abrt = 1;
            free(ptr);
            }
            ...
            if (abrt) {
            logError("operation aborted before commit", ptr);
            }

            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 416

            [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.use_after_free

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

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

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

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

                      亚洲欧美在线