Weakness (CWE)
CWE-190: Integer Overflow or Wraparound
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.
How to prevent it (7 mitigations)
-
Requirements
Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
-
Requirements
Use 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 Design
Use 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]
-
Implementation
Perform 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 values.
-
Implementation
Understand 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]
Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.
-
Architecture and Design
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
-
Implementation
Examine compiler warnings closely and eliminate problems with potential security implications, such as signed / unsigned mismatch in memory operations, or use of uninitialized variables. Even if the weakness is rarely exploitable, a single failure may lead to the compromise of the entire system.
Source: MITRE CWE-190
2,071 results · Feed
-
High 7.8
Windows Devices Human Interface Elevation of Privilege Vulnerability
Integer overflow or wraparound in HID Parser Library allows an authorized attacker to elevate privileges locally.
-
High 8.8
Microsoft Windows Search Component Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Windows Search Component allows an unauthorized attacker to execute code over a network.
-
Medium 6.8
Windows Kernel-Mode Driver Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows Kernel Mode Driver allows an unauthorized attacker to elevate privileges with a physical attack.
-
High 8.8
Microsoft Windows Media Foundation Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Windows Media Foundation allows an unauthorized attacker to execute code over a network.
-
High 8.8
Microsoft Office Excel Remote Code Execution Vulnerability
Integer overflow or wraparound in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.
-
High 8.8
Microsoft Office Excel Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.
-
High 8.8
Windows Raw Image Extension Remote Code Execution Vulnerability
Integer overflow or wraparound in Windows Raw Image Extension allows an unauthorized attacker to execute code over a network.
-
High 7.8
Windows NTFS Elevation of Privilege Vulnerability
Heap-based buffer overflow in Windows NTFS allows an authorized attacker to elevate privileges locally.
-
High 8.8
Microsoft Office Excel Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.
-
High 8.8
Microsoft Office Outlook Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Office Outlook allows an unauthorized attacker to execute code over a network.
-
High 8.1
Microsoft Office Word Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Office Word allows an unauthorized attacker to execute code over a network.
-
High 8.8
Windows Client Side Caching driver (csc.sys) Elevation of Privilege Vulnerability
Exposure of sensitive information to an unauthorized actor in Windows Client Side Caching driver (csc.sys) allows an authorized attacker to disclose information locally.
-
High 7.8
Windows IP Over USB Service Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows IP Over USB Service allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows Client for NFS Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows Client for NFS allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows Virtualization-Based Security (VBS) Enclave Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows Virtualization-Based Security (VBS) Enclave allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows Spaceport.sys Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows Spaceport.sys allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows NTFS Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows NTFS allows an authorized attacker to elevate privileges locally.
-
High 7.8
Microsoft PowerShell Remote Code Execution Vulnerability
Integer overflow or wraparound in Windows PowerShell allows an authorized attacker to execute code locally.
-
High 7.8
Windows Universal Disk Format File System Driver (UDFS) Elevation of Privilege Vulnerability
Use after free in Windows Universal Disk Format File System Driver (UDFS) allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows USB Video Driver Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows USB Video Driver allows an authorized attacker to elevate privileges locally.
-
High 7.8
Microsoft Account Elevation of Privilege Vulnerability
Heap-based buffer overflow in Microsoft Account allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows MIDI Service Module Elevation of Privileges Vulnerability
Heap-based buffer overflow in Windows MIDI Service Module allows an authorized attacker to elevate privileges locally.
-
High 8.8
Remote Desktop Client Remote Code Execution Vulnerability
Heap-based buffer overflow in Remote Desktop Client allows an unauthorized attacker to execute code over a network.
-
Critical 9.8
Microsoft PowerShell Remote Code Execution Vulnerability
Integer underflow (wrap or wraparound) in Windows PowerShell allows an unauthorized attacker to execute code over a network.
-
High 7.8
Windows Error Reporting Elevation of Privilege Vulnerability
Heap-based buffer overflow in Windows Error Reporting allows an authorized attacker to elevate privileges locally.
-
High 8.8
Windows iSCSI Remote Code Execution Vulnerability
Integer overflow or wraparound in Windows iSCSI allows an unauthorized attacker to execute code over a network.
-
High 7.8
Kernel Streaming Service Driver Elevation of Privilege Vulnerability
Integer overflow or wraparound in Microsoft Streaming Service allows an authorized attacker to elevate privileges locally.
-
High 7.8
Kernel Streaming Service Driver Elevation of Privilege Vulnerability
Heap-based buffer overflow in Microsoft Streaming Service allows an authorized attacker to elevate privileges locally.
-
High 7.8
Windows Overlay Filter Elevation of Privilege Vulnerability
Integer overflow or wraparound in Windows Overlay Filter allows an authorized attacker to elevate privileges locally.
-
High 7.5
Microsoft Office Word Remote Code Execution Vulnerability
Integer overflow or wraparound in Microsoft Office Word allows an unauthorized attacker to execute code over a network.
-
High 8.8
Microsoft Office Visio Remote Code Execution Vulnerability
Heap-based buffer overflow in Microsoft Office Visio allows an unauthorized attacker to execute code over a network.
-
High 8.8
HEVC Video Extensions Remote Code Execution Vulnerability
Integer overflow or wraparound in Microsoft Windows Codecs Library allows an unauthorized attacker to execute code over a network.
-
Low 3.3
Device-mapper-persistent-data: device-mapper-persistent-data: denial of service via crafted block indices
A flaw was found in device-mapper-persistent-data. A local attacker can cause a Denial of Service (DoS) by inducing a user or system tool to process crafted device metadata containing an excessively large block index. An arithmetic error in the synchronous bl…
-
High 8.4
Integer overflow in libmime buffer growth could lead to heap corruption
Several buffer-growth sites in libmime performed size arithmetic in 32-bit types without overflow checks. On a sufficiently large message the growth guard could fail open, or the buffer could be reallocated smaller than required, and a subsequent memcpy would…
-
Medium 6.7
ConnectBot SSH: Excessive allocation and integer overflow in DER private-key parsing
ConnectBot SSH Client Library is written in Kotlin with Kaitai Struct and KStateMachine. Prior to 0.3.1, DerReader.readLength() accepts excessive long-form DER length octets, accumulates them into an Int, and primitive readers allocate arrays without checking…
-
High 7.1
CvFWD Denial of Service
CvFWD contained an integer overflow affecting service availability. Software customers upgrade to resolved maintenance release. Update all Commvault installations, including CommServe, Webserver, Command Center, MediaAgents, Clients and HyperScale
-
High 7.1
UEFI OOB Write and Buffer Overflow Vulnerabilities
AMI APTIOV contains vulnerabilities in BIOS where users may cause “Integer Overflow or Wraparound” by local access. Successful exploitation of this vulnerability could lead to buffer overflows, memory corruption, and arbitrary code execution, and also impact …
-
Medium 6.5
FreeRDP 3.11.0 before 3.32.0 Integer Overflow via Mapped Video Geometry Update
Positive mapped-video coordinates overflow and abort FreeRDP clients A malicious or compromised RDP server can terminate a FreeRDP client after the user connects with video redirection enabled.
-
Medium 5.4
Integer overflow in the Layout: Text and Fonts component
Integer overflow in the Layout: Text and Fonts component. This vulnerability was fixed in Firefox 158, Firefox ESR 153.5, Thunderbird 158, and Thunderbird 153.5.
-
High 8.8
Integer overflow in the Graphics component
Integer overflow in the Graphics component. This vulnerability was fixed in Firefox 158, Firefox ESR 115.43, Firefox ESR 153.5, Thunderbird 158, and Thunderbird 153.5.