_alloca() 函數會拋出一個堆棧溢出異常,可能造成程序的崩潰。
_alloca() 函數在堆棧上分配存儲空間。如果分配請求對于可用的堆棧空間來說太大,_alloca() 將會拋出一個異常。如果未能捕獲到異常,程序將會崩潰,并有可能引起 denial of service 攻擊。
在 Microsoft Visual Studio 2005(R) 中,_alloca() 已經被淘汰。它已由更加安全的 _alloca_s() 所取代。
[1] Standards Mapping - OWASP Top 10 2007 - (OWASP 2007) A6 Information Leakage and Improper Error Handling
[2] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A7 Improper Error Handling
[3] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3120 CAT II
[4] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP3120 CAT II
[5] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 248
[6] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 6.3.1.2, Requirement 6.5.6
[7] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0 - (PCI 2.0) Requirement 6.5.5
[8] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.7