美文网首页
什么是Null pointer dereference?

什么是Null pointer dereference?

作者: _invincible_ | 来源:发表于2020-02-16 21:23 被阅读0次

问题来源

搜索exploit的时候经常看到。

简述

CWE-476: NULL Pointer Dereference :
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.

Null pointer - Wikipedia :
Because a null pointer does not point to a meaningful object, an attempt to dereference (ie. access the data stored at that memory location) a null pointer usually (but not always) causes a run-time error or immediate program crash.

被CWE(Common Weakness Enumeration)收录的一种程序缺陷类型。
缺陷来自于程序解引用(例如访问指针指向的内存数据)了一个空指针(本应为一个有效的指针)

1200 - Weaknesses in the 2019 CWE Top 25 Most Dangerous Software Errors

1. Improper Restriction of Operations within the Bounds of a Memory Buffer - (119)
2. Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') - (79)
3. Improper Input Validation - (20)
4. Information Exposure - (200)
5. Out-of-bounds Read - (125)
6. Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') - (89)
7. Use After Free - (416)
8. Integer Overflow or Wraparound - (190)
9. Cross-Site Request Forgery (CSRF) - (352)
10. Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') - (22)
11. Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') - (78)
12. Out-of-bounds Write - (787)
13. Improper Authentication - (287)
14. NULL Pointer Dereference - (476)
15. Incorrect Permission Assignment for Critical Resource - (732)
16. Unrestricted Upload of File with Dangerous Type - (434)
17. Improper Restriction of XML External Entity Reference - (611)
18. Improper Control of Generation of Code ('Code Injection') - (94)
19. Use of Hard-coded Credentials - (798)
20. Uncontrolled Resource Consumption - (400)
21. Missing Release of Resource after Effective Lifetime - (772)
22. Untrusted Search Path - (426)
23. Deserialization of Untrusted Data - (502)
24. Improper Privilege Management - (269)
25. Improper Certificate Validation - (295)

在2019年CWE Top 25 Most Dangerous Software Errors排在14位。其中我比较熟悉的Use After Free排在第七位。

案例

CVE-2018-5333

研究完了再来更新...

参考资料

CWE-476: NULL Pointer Dereference
CWE VIEW: Weaknesses in the 2019 CWE Top 25 Most Dangerous Software Errors
Null pointer - Wikipedia

相关文章

网友评论

      本文标题:什么是Null pointer dereference?

      本文链接:https://www.haomeiwen.com/subject/dtgmfhtx.html