Skip to content
OpenAdvisories

Weakness (CWE)

CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer

Class Mapping discouraged

The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.

How to prevent it (7 mitigations)
  1. Requirements

    Use 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 language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.

  2. 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.

    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.

  3. Operation, Build and Compilation

    Use 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 canary-based detection in detail.

  4. Implementation

    Consider 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 loop and make sure there is no danger of writing past the allocated space.

    - If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.

  5. Operation, Build and Compilation

    Run 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 modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking.

    For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].

  6. Operation

    Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment.

    For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].

  7. Implementation

    Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.

Source: MITRE CWE-119

770 results · Clear filters · Feed

  • Medium 4.9

    An improper restriction of operations within the bounds of a memory buffer in the parameter type parser of the Zyxel VM…

  • Medium 5.3

    Jwt filter crash in the clear route cache with remote JWKs in envoy

    Envoy is a cloud-native high-performance edge/middle/service proxy. Jwt filter will lead to an Envoy crash when clear route cache with remote JWKs. In the following case: 1. remote JWKs are used, which requires async header processing; 2. clear_route_cache is…

  • Medium 6.5

    Envoy crashes for LocalReply in http async client

    Envoy is a cloud-native high-performance edge/middle/service proxy. Envoy will crash when the http async client is handling `sendLocalReply` under some circumstance, e.g., websocket upgrade, and requests mirroring. The http async client will crash during the …

  • Medium 6.8

    Improper Restriction of Operations within the Bounds of a Memory Buffer in Storage

    memory corruption when an invalid firehose patch command is invoked.

  • Medium 6.0
    CVE-2023-31355 Public exploit

    Improper restriction of write operations in SNP firmware could allow a malicious hypervisor to overwrite a guest's UMC …

  • Medium 6.8

    Improper Restriction of Operations within the Bounds of a Memory Buffer in Linux Boot Loader

    Memory corruption during the secure boot process, when the `bootm` command is used, it bypasses the authentication of the kernel/rootfs image.

  • Medium 5.5

    virtio-net: fix pages leaking when building skb in big mode

    In the Linux kernel, the following vulnerability has been resolved: virtio-net: fix pages leaking when building skb in big mode We try to use build_skb() if we had sufficient tailroom. But we forget to release the unused pages chained via private in big mode …

  • Medium 6.1

    Improper conditions check in some Intel(R) BIOS PPAM firmware may allow a privileged user to potentially enable escalat…

  • Medium 5.9

    Improper input validation in Intel(R) Media SDK software all versions may allow an authenticated user to potentially en…

  • Medium 4.8

    Improper buffer restrictions in Intel(R) Media SDK all versions may allow an authenticated user to potentially enable e…

  • Medium 5.5
    CVE-2024-0088 EPSS 19%

    CVE

    NVIDIA Triton Inference Server for Linux contains a vulnerability in shared memory APIs, where a user can cause an improper memory access issue by a network API. A successful exploit of this vulnerability might lead to denial of service and data tampering.

  • Medium 6.5

    BIG-IP TMM tenants on VELOS and rSeries vulnerability

    Under certain conditions, a data leak may occur in the Traffic Management Microkernels (TMMs) of BIG-IP tenants running on VELOS and rSeries platforms. This leak occurs randomly and cannot be deliberately triggered. If it occurs, it may leak up to 64 bytes of…

  • Medium 4.4

    KW Watcher Vulnerability ALlows Malicious Read Access to Memory

    A buffer error in Panasonic KW Watcher versions 1.00 through 2.83 may allow attackers malicious read access to memory.

  • Medium 5.8

    The issue was addressed with improved checks. This issue is fixed in iOS 16.7.5 and iPadOS 16.7.5, iOS 17.3 and iPadOS …

  • Medium 6.5

    Io.vertx/vertx-core: memory leak due to the use of netty fastthreadlocal data structures in vertx

    A vulnerability in the Eclipse Vert.x toolkit results in a memory leak due to using Netty FastThreadLocal data structures. Specifically, when the Vert.x HTTP client establishes connections to different hosts, triggering the memory leak. The leak can be accele…

  • Medium 5.3

    Dell PowerEdge Server BIOS and Dell Precision Rack BIOS contain an Improper SMM communication buffer verification vulne…

  • Medium 5.5

    swftools v0.9.2 was discovered to contain a segmentation violation via the function state_free at swftools/src/swfc-his…

  • Medium 5.3

    Any-Capture Any Sound Recorder Registration memory corruption

    A vulnerability was found in Any-Capture Any Sound Recorder 2.93. It has been declared as problematic. This vulnerability affects unknown code of the component Registration Handler. The manipulation of the argument User Name/Key Code leads to memory corruptio…

  • Medium 5.3

    Nsasoft ShareAlarmPro Registration memory corruption

    A vulnerability was found in Nsasoft ShareAlarmPro 2.1.4 and classified as problematic. Affected by this issue is some unknown functionality of the component Registration Handler. The manipulation of the argument Name/Key leads to memory corruption. Local acc…

  • Medium 5.3

    Nsasoft Product Key Explorer Registration memory corruption

    A vulnerability has been found in Nsasoft Product Key Explorer 4.0.9 and classified as problematic. Affected by this vulnerability is an unknown functionality of the component Registration Handler. The manipulation of the argument Name/Key leads to memory cor…

  • Medium 6.3

    Delta Electronics Delta Industrial Automation DOPSoft DPS File wKPFStringLen Buffer Overflow Remote Code Execution

    A buffer overflow vulnerability exists in Delta Electronics Delta Industrial Automation DOPSoft version 2 when parsing the wKPFStringLen field of a DPS file. An anonymous attacker can exploit this vulnerability by enticing a user to open a specially crafted D…

  • Medium 4.4

    Illegal Memory Access Vulnerability of ZTE's ZXCLOUD iRAI

    There is an illegal memory access vulnerability of ZTE's ZXCLOUD iRAI product.When the vulnerability is exploited by an attacker with the common user permission, the physical machine will be crashed.

  • Medium 6.7
  • Medium 6.7
  • Medium 6.0

    Improper Restriction of Operation within the Bounds of a Memory Buffer in TZ Secure OS

    Information disclosure when the trusted application metadata symbol addresses are accessed while loading an ELF in TEE.

  • Medium 6.7

    Improper Restriction of Operations within the Bounds of a Memory Buffer in Radio Interface Layer

    Memory Corruption in Radio Interface Layer while sending an SMS or writing an SMS to SIM.

  • Medium 6.7

    Out-of-bounds access a buffer in IMS

    Memory Corruption in IMS while calling VoLTE Streamingmedia Interface

  • Medium 5.4

    Opensc: multiple memory issues with pkcs15-init (enrollment tool)

    Several memory vulnerabilities were identified within the OpenSC packages, particularly in the card enrollment process using pkcs15-init when a user or administrator enrolls cards. To take advantage of these flaws, an attacker must have physical access to the…

  • Medium 6.2

    Potential buffer overflow in php_cli_server_startup_workers

    A vulnerability was found in PHP where setting the environment variable PHP_CLI_SERVER_WORKERS to a large value leads to a heap buffer overflow.

  • Medium 6.5

    Junos OS and Junos OS Evolved: High CPU load due to specific NETCONF command

    An Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in the management daemon (mgd) process of Juniper Networks Junos OS and Junos OS Evolved allows a network-based authenticated low-privileged attacker, by executing a spec…

  • Medium 5.5

    Libtiff: memory leak in tiffcrop.c

    A memory leak flaw was found in Libtiff's tiffcrop utility. This issue occurs when tiffcrop operates on a TIFF image file, allowing an attacker to pass a crafted TIFF image file to tiffcrop utility, which causes this memory leak issue, resulting an applicatio…

  • Medium 6.7

    Improper Restrictions of Operations within the Bounds of a Memory Buffer in Display

    Memory Corruption while accessing metadata in Display.

  • Medium 6.7

    Improper Restriction of Operations within the Bounds of a Memory Buffer in Audio

    Memory corruption in Audio during playback session with audio effects enabled.

  • Medium 5.5

    Authenticated Local Privilege Escalation vulnerability in Intel Optimization for Tensorflow

    Improper buffer restrictions in the Intel(R) Optimization for Tensorflow software before version 2.12 may allow an authenticated user to potentially enable escalation of privilege via local access.

  • Medium 5.3

    A CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability exists that could caus…

  • Medium 5.3

    An improper array index validation vulnerability exists in the GraphPlanar::Write functionality of Diagon v1.0.139. A s…

  • Medium 6.7

    Improper Restrictions of Operations within the Bounds of a Memory Buffer in Linux

    Memory corruption in Linux while calling system configuration APIs.

  • Medium 6.7

    Improper Restriction of Operations within the Bounds of a Memory Buffer in Linux

    Memory Corruption in Linux while processing QcRilRequestImsRegisterMultiIdentityMessage request.

  • Medium 6.7

    Improper restriction of operations within the bounds of memory buffer in Linux

    Memory corruption in Linux while sending DRM request.

  • Medium 5.3

    Twister Antivirus IoControlCode filppd.sys 0x80800043 memory corruption

    A vulnerability classified as critical was found in Twister Antivirus 8. This vulnerability affects the function 0x804f2143/0x804f217f/0x804f214b/0x80800043 in the library filppd.sys of the component IoControlCode Handler. The manipulation leads to memory cor…