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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-190 (整数溢出或超界折返) — Vulnerability Class 817

817 vulnerabilities classified as CWE-190 (整数溢出或超界折返). AI Chinese analysis included.

CWE-190 represents a critical logic flaw where arithmetic operations exceed the maximum capacity of the assigned integer data type, causing the value to wrap around to a negative number or zero. Attackers typically exploit this vulnerability by manipulating input values to trigger the overflow, thereby bypassing security checks that assume the resulting number remains positive or within expected bounds. This often leads to severe consequences such as buffer overflows, memory corruption, or unauthorized access. To prevent such issues, developers must implement rigorous input validation and use safe arithmetic libraries that detect potential overflows before execution. Additionally, employing static analysis tools and adhering to secure coding standards ensures that integer calculations are handled with appropriate bounds checking, effectively mitigating the risk of wraparound errors in production environments.

MITRE CWE Description
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Common Consequences (5)
AvailabilityDoS: Crash, Exit, or Restart, DoS: Resource Consumption (Memory), DoS: Instability
This weakness can generally lead to undefined behavior and therefore crashes. When the calculated result is used for resource allocation, this weakness can cause too many (or too few) resources to be allocated, possibly enabling crashes if the product requests more resources than can be provided.
IntegrityModify Memory
If the value in question is important to data (as opposed to flow), simple data corruption has occurred. Also, if the overflow/wraparound results in other conditions such as buffer overflows, further memory corruption may occur.
Confidentiality, Availability, Access ControlExecute Unauthorized Code or Commands, Bypass Protection Mechanism
This weakness can sometimes trigger buffer overflows, which can be used to execute arbitrary code. This is usually outside the scope of the product's implicit security policy.
Availability, OtherAlter Execution Logic, DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU)
If the overflow/wraparound occurs in a loop index variable, this could cause the loop to terminate at the wrong time - too early, too late, or not at all (i.e., infinite loops). With too many iterations, some loops could consume too many resources such as memory, file handles, etc., possibly leading…
Access ControlBypass Protection Mechanism
If integer values are used in security-critical decisions, such as calculating quotas or allocation limits, integer overflows can be used to cause an incorrect security decision.
Mitigations (5)
RequirementsEnsure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
RequirementsUse a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.
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 [REF-1482]. Use libraries or frameworks that make it easier to handle numbers without unexpected consequences. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]
ImplementationPerform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range. Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum…
ImplementationUnderstand the programming language's underlying representation and how it interacts with numeric calculation (CWE-681). Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, "not-a-number" calculations, and how the language handles numbers that are too large or too small for its underlying representation. [REF-7]…
Examples (2)
The following image processing code allocates a table for images.
img_t table_ptr; /*struct containing img data, 10kB each*/ int num_imgs; ... num_imgs = get_num_imgs(); table_ptr = (img_t*)malloc(sizeof(img_t)*num_imgs); ...
Bad · C
The following code excerpt from OpenSSH 3.3 demonstrates a classic case of integer overflow:
nresp = packet_get_int(); if (nresp > 0) { response = xmalloc(nresp*sizeof(char*)); for (i = 0; i < nresp; i++) response[i] = packet_get_string(NULL); }
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2022-23587 Integer overflow in Tensorflow — tensorflow 8.8 High2022-02-04
CVE-2022-21801 Reolink RLC-410W 输入验证错误漏洞 — n/a 7.5 -2022-01-28
CVE-2021-44711 Adobe Acrobat Reader DC annotation gestures integer overflow vulnerability — Acrobat Reader 7.8 High2022-01-14
CVE-2021-43784 Overflow in netlink bytemsg length field allows attacker to override netlink-based container configuration — runc 6.0 Medium2021-12-06
CVE-2021-26615 bandisoft ARK library integer overflow vulnerability — ARK 7.8 High2021-11-26
CVE-2020-7881 AfreecaTV streamer service stack-based buffer overflow — afreecatvstreamer.exe 7.5 High2021-11-26
CVE-2021-41197 Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes — tensorflow 5.5 Medium2021-11-05
CVE-2021-41198 Overflow/crash in `tf.tile` when tiling tensor is large — tensorflow 5.5 Medium2021-11-05
CVE-2021-41199 Overflow/crash in `tf.image.resize` when size is large — tensorflow 5.5 Medium2021-11-05
CVE-2021-41195 Crash in `tf.math.segment_*` operations — tensorflow 5.5 Medium2021-11-05
CVE-2021-27665 exacqVision Server 32-bit — exacqVision Web Service 7.5 High2021-10-11
CVE-2021-41099 Integer overflow issue with strings in Redis — redis 7.5 High2021-10-04
CVE-2021-32762 Integer overflow that can lead to heap overflow in redis-cli, redis-sentinel on some platforms — redis 7.5 High2021-10-04
CVE-2021-32687 Integer overflow issue with intsets in Redis — redis 7.5 High2021-10-04
CVE-2021-32627 Integer overflow issue with Streams in Redis — redis 7.5 High2021-10-04
CVE-2021-32628 Vulnerability in handling large ziplists — redis 7.5 High2021-10-04
CVE-2021-32765 Integer Overflow to Buffer Overflow in Hiredis — hiredis 8.8 High2021-10-04
CVE-2021-36058 XMP Toolkit SDK Integer Overflow Vulnerability Could Result In Application Denial Of Service — XMP Toolkit 5.5 Medium2021-09-01
CVE-2021-22684 Samsung Galaxy Gear Series Tizen 输入验证错误漏洞 — Tizen RT RTOS 7.5 -2021-08-31
CVE-2020-7872 DaviewIndy 输入验证错误漏洞 — DaviewIndy 7.8 High2021-07-12
CVE-2021-21807 Accusoft ImageGear 输入验证错误漏洞 — Accusoft 9.8 -2021-07-07
CVE-2021-32714 Integer Overflow in Chunked Transfer-Encoding — hyper 5.9 Medium2021-07-07
CVE-2021-32491 DjVuLibre 输入验证错误漏洞 — djvulibre 7.8 -2021-06-24
CVE-2021-26461 malloc, realloc and memalign implementations are vulnerable to integer wrap-arounds — Apache NuttX 9.8 -2021-06-21
CVE-2020-7860 UnEGG 输入验证错误漏洞 — UnEGG 7.8 High2021-06-11
CVE-2021-3520 LZ4 输入验证错误漏洞 — lz4 8.8 -2021-06-02
CVE-2021-32027 PostgreSQL 输入验证错误漏洞 — postgresql 8.8 -2021-06-01
CVE-2020-13603 Integer Overflow in memory allocating functions — zephyr 6.9 Medium2021-05-24
CVE-2021-3402 YARA 输入验证错误漏洞 — libyara 9.1 -2021-05-14
CVE-2021-29523 CHECK-fail in AddManySparseToTensorsMap — tensorflow 2.5 Low2021-05-14

Vulnerabilities classified as CWE-190 (整数溢出或超界折返) represent 817 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.