目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1310

100%

CWE-476 空指针解引用 类漏洞列表 1187

CWE-476 空指针解引用 类弱点 1187 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-476空指针解引用属于内存安全类漏洞,指程序在指针为NULL时仍尝试访问其指向的内存。攻击者通常通过构造特定输入触发空指针,导致程序崩溃引发拒绝服务,或在特定架构下利用该异常改变执行流以执行恶意代码。开发者应避免在解引用前未验证指针有效性,通过添加空值检查、使用静态分析工具检测潜在风险,并确保代码逻辑能妥善处理无效指针情况,从而从根本上消除隐患。

MITRE CWE 官方描述
CWE:CWE-476 NULL Pointer Dereference(空指针解引用) 英文:The product dereferences a pointer that it expects to be valid but is NULL. 译文:产品解引用了一个它预期为有效但实际上为 NULL 的指针。
常见影响 (2)
AvailabilityDoS: Crash, Exit, or Restart
NULL pointer dereferences usually result in the failure of the process unless exception handling (on some platforms) is available and implemented. Even when exception handling is being used, it can still be very difficult to return the software to a safe state of operation.
Integrity, ConfidentialityExecute Unauthorized Code or Commands, Read Memory, Modify Memory
In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution.
缓解措施 (5)
ImplementationFor any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
RequirementsSelect a programming language that is not susceptible to these issues.
ImplementationCheck the results of all functions that return a value and verify that the value is non-null before acting upon it.
Effectiveness: Moderate
Architecture and DesignIdentify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
ImplementationExplicitly initialize all variables and other data stores, either during declaration or just before the first usage.
代码示例 (2)
This example takes an IP address from a user, verifies that it is well formed and then looks up the hostname and copies it into a buffer.
void host_lookup(char *user_supplied_addr){ struct hostent *hp; in_addr_t *addr; char hostname[64]; in_addr_t inet_addr(const char *cp); /*routine that ensures user_supplied_addr is in the right format for conversion */ validate_addr_form(user_supplied_addr); addr = inet_addr(user_supplied_addr); hp = gethostbyaddr( addr, sizeof(struct in_addr), AF_INET); strcpy(hostname, hp->h_name); }
Bad · C
In the following code, the programmer assumes that the system always has a property named "cmd" defined. If an attacker can control the program's environment so that "cmd" is not defined, the program throws a NULL pointer exception when it attempts to call the trim() method.
String cmd = System.getProperty("cmd"); cmd = cmd.trim();
Bad · Java
CVE ID标题CVSS风险等级Published
CVE-2017-2634 Linux kernel 代码问题漏洞 — kernel: 9.1 -2018-07-27
CVE-2017-2586 Netpbm 安全漏洞 — netpbm 5.5 -2018-07-27
CVE-2017-15120 PowerDNS Recursor 安全漏洞 — pdns-recursor 7.5 -2018-07-27
CVE-2018-0305 多款Cisco产品FXOS Software和NX-OS Software Fabric Services组件安全漏洞 — Cisco FXOS and NX-OS unknown 7.5 -2018-06-21
CVE-2018-1172 Squid Software Foundation Squid 安全漏洞 — The Squid Software Foundation Squid 5.9 -2018-05-16
CVE-2018-1130 Linux kernel 安全漏洞 — kernel 5.5 -2018-05-10
CVE-2018-1050 Samba 代码问题漏洞 — Samba 5.7 -2018-03-13
CVE-2016-9600 JasPer 安全漏洞 — jasper 6.5 -2018-03-12
CVE-2018-5449 Moxa OnCell G3100-HSPA Series 安全漏洞 — Moxa OnCell G3100-HSPA Series 7.5 -2018-03-05
CVE-2017-12193 Linux kernel 代码问题漏洞 — Linux kernel since 3.13 up to 4.14 (not including) 5.0 -2017-11-22
CVE-2017-12153 Linux kernel 安全漏洞 — kernel since v3.1-rc1 through v4.13 4.4 -2017-09-21
CVE-2017-9631 Schneider Electric Wonderware ArchestrA Logger 安全漏洞 — Schneider Electric Wonderware ArchestrA Logger 7.5 -2017-07-07
CVE-2017-3169 Apache httpd 安全漏洞 — Apache HTTP Server 9.1 -2017-06-20
CVE-2017-7502 NSS 代码问题漏洞 — nss 7.5 -2017-05-30
CVE-2017-7511 Poppler pdfunite 安全漏洞 — poppler 5.5 -2017-05-30
CVE-2016-6561 Oracle illumos 安全漏洞 — osnet-incorporation 7.5 -2017-03-31
CVE-2014-0757 Smart Software Solutions CoDeSys Runtime Toolkit 拒绝服务漏洞 — CoDeSys Runtime Toolkit 7.5 -2014-01-31

CWE-476(空指针解引用) 是常见的弱点类别,本平台收录该类弱点关联的 1187 条 CVE 漏洞。