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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-120 (未进行输入大小检查的缓冲区拷贝(传统缓冲区溢出)) — Vulnerability Class 1767

1767 vulnerabilities classified as CWE-120 (未进行输入大小检查的缓冲区拷贝(传统缓冲区溢出)). AI Chinese analysis included.

CWE-120 represents a critical memory safety vulnerability where software copies data into a fixed-size buffer without validating the input’s length against the destination’s capacity. This classic buffer overflow occurs when an attacker supplies input exceeding the allocated memory space, causing data to spill into adjacent memory regions. Exploitation typically involves injecting malicious code or altering program control flow, such as overwriting return addresses to execute arbitrary commands. Developers prevent this weakness by implementing rigorous bounds checking before any copy operation, ensuring the input size never exceeds the buffer’s limits. Utilizing safer, language-specific functions that automatically handle size verification, or adopting modern programming languages with built-in memory safety features, effectively mitigates this risk and preserves application integrity against memory corruption attacks.

MITRE CWE Description
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.
Common Consequences (2)
Integrity, Confidentiality, AvailabilityModify Memory, Execute Unauthorized Code or Commands
Buffer overflows often can be used to execute arbitrary code, which is usually outside the scope of the product's implicit security policy. This can often be used to subvert any other security service.
AvailabilityModify Memory, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU)
Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the product into an infinite loop.
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 your buffer is as large as you specify. 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 i…
ImplementationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range…
Examples (2)
The following code asks the user to enter their last name and then attempts to store the value entered in the last_name array.
char last_name[20]; printf ("Enter your last name: "); scanf ("%s", last_name);
Bad · C
The following code attempts to create a local copy of a buffer to perform some manipulations to the data.
void manipulate_string(char * string){ char buf[24]; strcpy(buf, string); ... }
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2020-14376 Ubuntu DPDK 缓冲区错误漏洞 — dpdk 8.2 -2020-09-30
CVE-2020-8252 Node.js 缓冲区错误漏洞 — Node 9.8 -2020-09-18
CVE-2020-2040 PAN-OS: Buffer overflow when Captive Portal or Multi-Factor Authentication (MFA) is enabled — PAN-OS 9.8 Critical2020-09-09
CVE-2020-1886 Android WhatsApp 安全漏洞 — WhatsApp for Android 8.8 -2020-09-03
CVE-2020-9063 NCR SelfServ ATM APTRA XFS 安全漏洞 — SelfServ ATM 7.6 -2020-08-21
CVE-2020-8905 Confidential Information Disclosure vulnerability in Asylo — Asylo 2.8 Low2020-08-12
CVE-2020-7374 Documalis Free PDF Editor / Free PDF Scanner Stack Based Buffer Overflow — Free PDF Editor 5.3 Medium2020-08-12
CVE-2020-8215 canvas 缓冲区错误漏洞 — node-canvas 8.8 -2020-07-20
CVE-2020-1654 Junos OS: SRX Series: processing a malformed HTTP message when ICAP redirect service is enabled may can lead to flowd process crash or remote code execution — Junos OS 9.8 Critical2020-07-17
CVE-2020-10042 Siemens SICAM MMU、SGU和T 缓冲区错误漏洞 — SICAM MMU 9.8 -2020-07-14
CVE-2020-7593 Siemens LOGO! 8 BM 缓冲区错误漏洞 — LOGO! 8 BM (incl. SIPLUS variants) 9.8 -2020-07-14
CVE-2020-3931 GeoVision Door Access Control Device - Buffer overflow vulnerability — Door Access Control Device 9.8 Critical2020-07-08
CVE-2020-11068 Potential Buffer Overflow in LoRaMac-node — LoRaMac-node 5.0 Medium2020-06-23
CVE-2020-10071 Insufficient publish message length validation in MQTT — zephyr 9.0 Critical2020-06-05
CVE-2020-10070 MQTT buffer overflow on receive buffer — zephyr 9.0 Critical2020-06-05
CVE-2020-2015 PAN-OS: Buffer overflow in the management server — PAN-OS 8.8 High2020-05-13
CVE-2020-10023 Shell Subsystem Contains a Buffer Overflow Vulnerability In shell_spaces_trim — zephyr 6.9 Medium2020-05-11
CVE-2020-10022 UpdateHub Module Copies a Variable-Size Hash String Into a Fixed-Size Array — zephyr 9.0 Critical2020-05-11
CVE-2020-10019 Buffer Overflow in USB DFU requested length — zephyr 8.1 High2020-05-11
CVE-2020-6999 Moxa EDS-G516E 缓冲区错误漏洞 — Moxa EDS-G516E Series firmware, Version 5.2 or lower 9.1 -2020-03-26
CVE-2019-5143 Moxa AWK-3131A 格式化字符串错误漏洞 — Moxa 8.8 -2020-02-25
CVE-2020-5208 remote code execution vulnerability in ipmitool — ipmitool 7.7 High2020-02-05
CVE-2020-5211 NetHack AUTOCOMPLETE configuration file option is subject to a buffer overflow — NetHack 5.0 Medium2020-01-28
CVE-2020-5212 NetHack MENUCOLOR configuration file option is subject to a buffer overflow — NetHack 5.0 Medium2020-01-28
CVE-2020-5213 NetHack SYMBOL configuration file option is subject to a buffer overflow — NetHack 5.0 Medium2020-01-28
CVE-2020-5214 NetHack error recovery after syntax error in configuration file is subject to a buffer overflow — NetHack 5.0 Medium2020-01-28
CVE-2020-5209 NetHack command line parsing of options starting with -de and -i is subject to a buffer overflow — NetHack 5.0 Medium2020-01-28
CVE-2020-5210 NetHack command line -w option parsing is subject to a buffer overflow — NetHack 5.0 Medium2020-01-28
CVE-2019-17147 TP-Link TL-WR841N 缓冲区错误漏洞 — TL-WR841N 9.8 -2020-01-07
CVE-2019-5064 OpenCV 缓冲区错误漏洞 — OpenCV 8.8 -2020-01-03

Vulnerabilities classified as CWE-120 (未进行输入大小检查的缓冲区拷贝(传统缓冲区溢出)) represent 1767 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.