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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-126 (缓冲区上溢读取) — Vulnerability Class 417

417 vulnerabilities classified as CWE-126 (缓冲区上溢读取). AI Chinese analysis included.

CWE-126, Buffer Over-read, is a memory safety weakness where a software component reads data from memory locations beyond the allocated boundaries of a target buffer. This vulnerability typically arises when developers fail to validate array indices or pointer arithmetic, allowing an attacker to access sensitive information stored in adjacent memory regions. Exploitation often leads to information disclosure, where attackers extract confidential data such as cryptographic keys or user credentials, or potentially trigger denial-of-service conditions by causing application crashes. To mitigate this risk, developers must rigorously enforce bounds checking on all buffer access operations, ensuring that read indices remain within the valid memory range. Utilizing safe programming languages with automatic memory management and employing static analysis tools during the development lifecycle can further help detect and prevent these out-of-bounds read errors before deployment.

MITRE CWE Description
The product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations after the targeted buffer.
Common Consequences (3)
ConfidentialityRead Memory
ConfidentialityBypass Protection Mechanism
By reading out-of-bounds memory, an attacker might be able to get secret values, such as memory addresses, which can bypass protection mechanisms such as ASLR in order to improve the reliability and likelihood of exploiting a separate weakness to achieve code execution instead of just denial of serv…
Availability, IntegrityDoS: Crash, Exit, or Restart
An attacker might be able to cause a crash or other denial of service by causing the product to read a memory location that is not allowed (such as a segmentation fault), or to cause other conditions in which the read operation returns more data than is expected.
Examples (2)
In the following C/C++ example the method processMessageFromSocket() will get a message from a socket, placed into a buffer, and will parse the contents of the buffer into a structure that contains the message length and the message body. A for loop is used to copy the message body into a local character string which will be passed to another method for processing.
int processMessageFromSocket(int socket) { int success; char buffer[BUFFER_SIZE]; char message[MESSAGE_SIZE]; // get message from socket and store into buffer //Ignoring possibliity that buffer > BUFFER_SIZE if (getMessage(socket, buffer, BUFFER_SIZE) > 0) { // place contents of the buffer into message structure ExMessage *msg = recastBuffer(buffer); // copy message body into string for processing int index; for (index = 0; index < msg->msgLength; index++) { message[index] = msg->msgBody[index]; } message[index] = '\0'; // process message success = processMessage(message); } return success; }
Bad · C
The following C/C++ example demonstrates a buffer over-read due to a missing NULL terminator. The main method of a pattern matching utility that looks for a specific pattern within a specific file uses the string strncopy() method to copy the command line user input file name and pattern to the Filename and Pattern character arrays respectively.
int main(int argc, char **argv) { char Filename[256]; char Pattern[32]; /* Validate number of parameters and ensure valid content */ ... /* copy filename parameter to variable, may cause off-by-one overflow */ strncpy(Filename, argv[1], sizeof(Filename)); /* copy pattern parameter to variable, may cause off-by-one overflow */ strncpy(Pattern, argv[2], sizeof(Pattern)); printf("Searching file: %s for the pattern: %s\n", Filename, Pattern); Scan_File(Filename, Pattern); }
Bad · C
/* copy filename parameter to variable, no off-by-one overflow */ strncpy(Filename, argv[2], sizeof(Filename)-1); Filename[255]='\0'; /* copy pattern parameter to variable, no off-by-one overflow */ strncpy(Pattern, argv[3], sizeof(Pattern)-1); Pattern[31]='\0';
Good · C
CVE IDTitleCVSSSeverityPublished
CVE-2022-42774 UNISOC chipset 缓冲区错误漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8002 5.5 -2022-12-06
CVE-2022-42779 UNISOC chipset 缓冲区错误漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8003 5.5 -2022-12-06
CVE-2022-42780 UNISOC chipset 缓冲区错误漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8005 5.5 -2022-12-06
CVE-2022-42781 UNISOC chipset缓冲区错误漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8006 5.5 -2022-12-06
CVE-2022-38671 UNISOC chipset 缓冲区错误漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8000 5.5 -2022-10-14
CVE-2022-38673 UNISOC chipset缓冲区错误漏洞 — SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8000 5.5 -2022-10-14
CVE-2022-3178 Buffer Over-read in gpac/gpac — gpac/gpac 7.8 -2022-09-12
CVE-2022-20823 Cisco NX-OS Software OSPFv3 Denial of Service Vulnerability — Cisco NX-OS Software 8.6 High2022-08-25
CVE-2020-35511 libpng pngcheck 缓冲区错误漏洞 — pngcheck 5.5 -2022-08-23
CVE-2022-2301 Buffer Over-read in hpjansson/chafa — hpjansson/chafa 5.0 -2022-07-04
CVE-2022-32141 CODESYS runtime system prone to denial of service due to buffer over read — Runtime Toolkit 6.5 Medium2022-06-24
CVE-2022-2175 Buffer Over-read in vim/vim — vim/vim 7.8 -2022-06-23
CVE-2022-2124 Buffer Over-read in vim/vim — vim/vim 7.8 -2022-06-19
CVE-2022-1987 Buffer Over-read in bfabiszewski/libmobi — bfabiszewski/libmobi 7.1 -2022-06-03
CVE-2022-1927 Buffer Over-read in vim/vim — vim/vim 7.8 -2022-05-29
CVE-2022-1908 Buffer Over-read in bfabiszewski/libmobi — bfabiszewski/libmobi 7.1 -2022-05-27
CVE-2022-1907 Buffer Over-read in bfabiszewski/libmobi — bfabiszewski/libmobi 7.1 -2022-05-27
CVE-2022-1769 Buffer Over-read in vim/vim — vim/vim 7.8 -2022-05-17
CVE-2022-1720 Buffer Over-read in function grab_file_name in vim/vim — vim/vim 7.8 -2022-05-16
CVE-2022-1629 Buffer Over-read in function find_next_quote in vim/vim — vim/vim 7.8 -2022-05-10
CVE-2022-1533 Buffer Over-read in bfabiszewski/libmobi — bfabiszewski/libmobi 7.8 -2022-04-29
CVE-2022-1534 Buffer Over-read at parse_rawml.c:1416 in bfabiszewski/libmobi — bfabiszewski/libmobi 9.1 -2022-04-29
CVE-2022-20714 Cisco IOS XR Software for ASR 9000 Series Routers Lightspeed-Plus Line Cards Denial of Service Vulnerability — Cisco IOS XR Software 8.6 High2022-04-15
CVE-2022-22519 Special HTTP(s) Requests can cause a buffer-read causing a crash of the webserver and the runtime system. — CODESYS Control RTE (SL) 7.5 High2022-04-07
CVE-2022-23130 Mitsubishi Electric MC Works64 缓冲区错误漏洞 — GENESIS64 5.9 Medium2022-01-21
CVE-2021-22563 Memory Overread in libjxl — libjxl 4.5 Medium2021-11-01
CVE-2021-34584 CODESYS V2 web server: crafted requests could trigger a buffer over-read (DoS) — CODESYS V2 9.1 Critical2021-10-26
CVE-2021-1588 Cisco NX-OS Software MPLS OAM Denial of Service Vulnerability — Cisco NX-OS Software 8.6 High2021-08-25
CVE-2021-22552 Memory overread secure enclave in Asylo 0.6.2 — Asylo 5.3 Medium2021-08-02
CVE-2021-1614 Cisco SD-WAN Software Information Disclosure Vulnerability — Cisco SD-WAN Solution 5.3 Medium2021-07-22

Vulnerabilities classified as CWE-126 (缓冲区上溢读取) represent 417 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.