CWE-690 상세 정보

CWE-690

Unchecked Return Value to NULL Pointer Dereference
2008-04-11
00h00 +00:00
Draft
2026-10-28
00h00 +00:00
특정 CWE 알림
특정 CWE의 변경 사항에 대한 정보를 받아보세요.
알림 관리

이름: Unchecked Return Value to NULL Pointer Dereference

The product does not check for an error after calling a function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference.

일반 정보

배경 세부 정보

취약점 도입 방식

Implementation : A typical occurrence of this weakness occurs when an application includes user-controlled input to a malloc() call. The related code might be correct with respect to preventing buffer overflows, but if a large value is provided, the malloc() will fail due to insufficient memory. This problem also frequently occurs when a parsing routine expects that certain elements will always be present. If malformed input is provided, the parser might return NULL. For example, strtok() can return NULL.

적용 가능한 플랫폼

언어

클래스: Memory-Unsafe (Often)
이름: C (Undetermined)
이름: C++ (Undetermined)

일반적인 결과

범위 영향 가능성
AvailabilityDoS: Crash, Exit, or Restart
Integrity
Confidentiality
Availability
Execute 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.

관찰된 예시

참고 자료 설명

CVE-2008-1052

Large Content-Length value leads to NULL pointer dereference when malloc fails.

CVE-2006-6227

Large message length field leads to NULL pointer dereference when malloc fails.

CVE-2006-2555

Parsing routine encounters NULL dereference when input is missing a colon separator.

CVE-2003-1054

URI parsing API sets argument to NULL when a parsing failure occurs, such as when the Referer header is missing a hostname, leading to NULL dereference.

CVE-2008-5183

Chain: unchecked return value can lead to NULL dereference

탐지 방법

Black Box

This typically occurs in rarely-triggered error conditions, reducing the chances of detection during black box testing.

White Box

Code analysis can require knowledge of API behaviors for library functions that might return NULL, reducing the chances of detection when unknown libraries are used.

Automated Dynamic Analysis

Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518].
효과성 : Moderate

취약점 매핑 메모

근거 : This CWE entry is a named chain, which combines multiple weaknesses.
댓글 : Mapping to each separate weakness in the chain would be more precise.

참고 자료

REF-1518

AddressSanitizer
https://clang.llvm.org/docs/AddressSanitizer.html

제출

이름 조직 날짜 출시일 Version
CWE Content Team MITRE 2008-04-11 +00:00 2008-04-11 +00:00 Draft 9

수정 사항

이름 조직 날짜 댓글
Sean Eidemiller Cigital 2008-07-01 +00:00 added/updated demonstrative examples
Eric Dalci Cigital 2008-07-01 +00:00 updated Time_of_Introduction
CWE Content Team MITRE 2008-09-08 +00:00 updated Applicable_Platforms, Description, Detection_Factors, Relationships, Other_Notes
CWE Content Team MITRE 2009-12-28 +00:00 updated Demonstrative_Examples
CWE Content Team MITRE 2010-09-27 +00:00 updated Observed_Examples
CWE Content Team MITRE 2011-06-01 +00:00 updated Common_Consequences, Relationships, Taxonomy_Mappings
CWE Content Team MITRE 2011-09-13 +00:00 updated Relationships, Taxonomy_Mappings
CWE Content Team MITRE 2014-06-23 +00:00 updated Modes_of_Introduction, Other_Notes
CWE Content Team MITRE 2017-01-19 +00:00 updated Relationships
CWE Content Team MITRE 2017-11-08 +00:00 updated Relationships, Relevant_Properties, Taxonomy_Mappings, Time_of_Introduction
CWE Content Team MITRE 2019-01-03 +00:00 updated Relationships, Taxonomy_Mappings
CWE Content Team MITRE 2020-06-25 +00:00 updated Common_Consequences
CWE Content Team MITRE 2021-03-15 +00:00 updated Demonstrative_Examples, Relationships
CWE Content Team MITRE 2023-04-27 +00:00 updated Relationships
CWE Content Team MITRE 2023-06-29 +00:00 updated Mapping_Notes, Relationships
CWE Content Team MITRE 2025-12-11 +00:00 updated Applicable_Platforms, Detection_Factors, References, Weakness_Ordinalities
CWE Content Team MITRE 2026-10-28 +00:00 updated Background_Details, Description