Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-119 (内存缓冲区边界内操作的限制不恰当) — Vulnerability Class 1064

1064 vulnerabilities classified as CWE-119 (内存缓冲区边界内操作的限制不恰当). AI Chinese analysis included.

CWE-119 represents a critical memory safety weakness where software performs read or write operations beyond the intended boundaries of a memory buffer. This flaw typically arises from insufficient validation of input lengths or loop counters, allowing attackers to manipulate program execution flow. By crafting malicious inputs that exceed buffer limits, adversaries can overwrite adjacent memory, corrupt data structures, or inject executable code, often leading to remote code execution or system crashes. Developers mitigate this risk by implementing rigorous bounds checking before any memory access, utilizing safe string handling functions that enforce length limits, and adopting modern programming languages with automatic memory management. Additionally, employing static analysis tools and fuzzing techniques during development helps identify out-of-bounds accesses early, ensuring that all buffer operations remain strictly within allocated memory regions to prevent exploitation.

MITRE CWE Description
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Common Consequences (3)
Integrity, Confidentiality, AvailabilityExecute Unauthorized Code or Commands, Modify Memory
If the memory accessible by the attacker can be effectively controlled, it may be possible to execute arbitrary code, as with a standard buffer overflow. If the attacker can overwrite a pointer's worth of memory (usually 32 or 64 bits), they can alter the intended control flow by redirecting a funct…
Availability, ConfidentialityRead Memory, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory)
Out of bounds memory access will very likely result in the corruption of relevant memory, and perhaps instructions, possibly leading to a crash. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.
ConfidentialityRead Memory
In the case of an out-of-bounds read, the attacker may have access to sensitive information. If the sensitive information contains system details, such as the current buffer's position in memory, this knowledge can be used to craft further attacks, possibly with more severe consequences.
Mitigations (5)
RequirementsUse a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a lan…
Architecture and DesignUse a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
Operation, Build and CompilationUse automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses…
Effectiveness: Defense in Depth
ImplementationConsider adhering to the following rules when allocating and managing an application's memory: Double check that the buffer is as large as specified. When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string. Check buffer boundaries if accessing the buffer in a…
Operation, Build and CompilationRun or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported…
Effectiveness: Defense in Depth
Examples (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
This example applies an encoding procedure to an input string and stores it into a buffer.
char * copy_input(char *user_supplied_string){ int i, dst_index; char *dst_buf = (char*)malloc(4*sizeof(char) * MAX_SIZE); if ( MAX_SIZE <= strlen(user_supplied_string) ){ die("user string too long, die evil hacker!"); } dst_index = 0; for ( i = 0; i < strlen(user_supplied_string); i++ ){ if( '&' == user_supplied_string[i] ){ dst_buf[dst_index++] = '&'; dst_buf[dst_index++] = 'a'; dst_buf[dst_index++] = 'm'; dst_buf[dst_index++] = 'p'; dst_buf[dst_index++] = ';'; } else if ('<' == user_supplied_string[i] ){ /* encode to &lt; */ } else dst_buf[dst_index++] = user_supplied_string[i]; } return ds
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2019-25078 pacparser pacparser.c pacparser_find_proxy buffer overflow — pacparser 5.3 Medium2022-12-13
CVE-2022-4291 Aswjsflt.dll in Avast Antivirus windows caused a crash of the Mozilla Firefox browser due to heap corruption — Avast Antivirus 7.7 High2022-12-07
CVE-2022-43581 IBM Content Navigator code execution — Content Navigator 7.5 High2022-12-07
CVE-2022-39131 Google Pixel 安全漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8000 5.5 -2022-12-06
CVE-2022-42775 UNISOC chipset 安全漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8000 5.5 -2022-12-06
CVE-2022-24939 Malformed Zigbee packet with invalid destination address causes Assert — Ember ZNet 5.7 Medium2022-11-17
CVE-2022-41877 Missing input length validation in `drive` channel in FreeRDP — FreeRDP 4.6 Medium2022-11-16
CVE-2022-3461 Buffer Overflow in PHOENIX CONTACT Automationworx Software Suite — Config+ 7.8 High2022-11-15
CVE-2022-24938 Malformed Zigbee packet causes Assert in EmberZNet 7.0.1 or earlier — Ember ZNet 6.5 Medium2022-11-14
CVE-2022-24937 Malformed Zigbee packet causes Assert in EmberZNet 7.0.0 or earlier — Ember ZNet 6.5 Medium2022-11-14
CVE-2022-0137 HTMLDOC 缓冲区错误漏洞 — htmldoc 7.5 High2022-11-14
CVE-2022-3965 ffmpeg QuickTime Graphics Video Encoder smcenc.c smc_encode_stream out-of-bounds — ffmpeg 4.3 Medium2022-11-13
CVE-2022-3964 ffmpeg QuickTime RPZA Video Encoder rpzaenc.c out-of-bounds — ffmpeg 4.3 Medium2022-11-13
CVE-2022-3974 Axiomatic Bento4 mp4info Ap4StdCFileByteStream.cpp ReadPartial heap-based overflow — Bento4 6.3 Medium2022-11-13
CVE-2022-20947 Cisco Adaptive Security Appliance Software和Firepower Threat Defense(FTD)Software 缓冲区错误漏洞 — Cisco Adaptive Security Appliance (ASA) Software 8.6 High2022-11-10
CVE-2022-39392 Wasmtime vulnerable to out of bounds read/write with zero-memory-pages configuration — wasmtime 5.9 Medium2022-11-10
CVE-2022-32588 Accusoft ImageGear 缓冲区错误漏洞 — ImageGear 7.8 -2022-11-09
CVE-2022-24936 Gecko Standalone Bootloader vulnerability may allow bypassing application secure boot in some Series 2 devices — Gecko Bootloader 8.3 High2022-11-02
CVE-2022-3784 Axiomatic Bento4 mp4hls Ap4Mp4AudioInfo.cpp ReadBits heap-based overflow — Bento4 6.3 Medium2022-10-31
CVE-2022-3785 Axiomatic Bento4 Avcinfo SetDataSize heap-based overflow — Bento4 6.3 Medium2022-10-31
CVE-2022-3662 Axiomatic Bento4 mp42hls Ap4Sample.h GetOffset use after free — Bento4 7.3 High2022-10-26
CVE-2022-3664 Axiomatic Bento4 avcinfo Ap4BitStream.cpp WriteBytes heap-based overflow — Bento4 7.3 High2022-10-26
CVE-2022-3665 Axiomatic Bento4 avcinfo AvcInfo.cpp heap-based overflow — Bento4 7.3 High2022-10-26
CVE-2022-3666 Axiomatic Bento4 mp42ts Ap4LinearReader.cpp Advance use after free — Bento4 7.3 High2022-10-26
CVE-2022-3667 Axiomatic Bento4 mp42aac Ap4ByteStream.cpp WritePartial heap-based overflow — Bento4 7.3 High2022-10-26
CVE-2022-3670 Axiomatic Bento4 mp42hevc WriteSample heap-based overflow — Bento4 7.3 High2022-10-26
CVE-2022-3705 vim autocmd quickfix.c qf_update_buffer use after free — vim 5.0 Medium2022-10-26
CVE-2022-3625 Linux Kernel IPsec devlink.c devlink_param_get use after free — Kernel 4.6 Medium2022-10-21
CVE-2022-3635 Linux Kernel IPsec idt77252.c tst_timer use after free — Kernel 5.5 Medium2022-10-21
CVE-2022-3636 Linux Kernel Ethernet mtk_ppe.c __mtk_ppe_check_skb use after free — Kernel 5.5 Medium2022-10-21

Vulnerabilities classified as CWE-119 (内存缓冲区边界内操作的限制不恰当) represent 1064 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.