<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>

                    Unsafe Mobile Code: Public finalize() Method

                    ABSTRACT

                    該程序違反了移動代碼的安全編碼原則,它將 finalize() 方法聲明為 public

                    EXPLANATION

                    除非在 finalize() 的實現方法內部調用 super.finalize(),否則請不要顯式地調用 finalize。在移動代碼中,手動垃圾回收這種帶有錯誤傾向的操作會威脅到系統的安全,由于 finalize() 的聲明中包含對 public 訪問,因此會造成攻擊者的惡意調用。如果您按其最初設計使用 finalize(),則應首先聲明 finalize() 包含 protected 訪問權限。

                    例 1:以下 Java Applet 代碼錯誤地聲明了一種 public finalize() 方法。


                    public final class urlTool extends Applet {
                    public void finalize() {
                    ...
                    }
                    ...
                    }


                    移動代碼,在本例中也就是 Java Applet,通過網絡進行傳遞并在遠程機器上運行。因為移動代碼的編寫者很難控制其所編寫代碼的運行環境,所以在安全上提出特別的要求理所當然。一個最大的環境威脅在于,移動代碼可以伴隨其他潛在的惡意移動代碼一起運行。因為所有的主流 web 瀏覽器會在同一 JVM 中執行來自多個來源的代碼,所以,許多移動代碼的安全指導原則都很關注可以訪問到運行著您程序的同一虛擬機的攻擊者,避免他們操縱您的對象的狀態和行為。

                    REFERENCES

                    [1] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 583

                    [2] G. McGraw Securing Java.Chapter 7:Java Security Guidelines


                    Copyright 2013 Fortify Software - All rights reserved.
                    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
                    desc.structural.java.unsafe_mobile_code_public_finalize_method

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频