7.5 CVE-2024-7254

Enriched by CISA Patch
 

Any project that parses untrusted Protocol Buffers data containing an arbitrary number of nested groups / series of SGROUP tags can corrupted by exceeding the stack limit i.e. StackOverflow. Parsing nested groups as unknown fields with DiscardUnknownFieldsParser or Java Protobuf Lite parser, or against Protobuf map fields, creates unbounded recursions that can be abused by an attacker.
https://nvd.nist.gov/vuln/detail/CVE-2024-7254

Categories

CWE-400 : Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource. Certain automated dynamic analysis techniques may be effective in spotting resource exhaustion problems, especially with resources such as processes, memory, and connections. The technique may involve generating a large number of requests to the product within a short time frame. While fuzzing is typically geared toward finding low-level implementation bugs, it can inadvertently find resource exhaustion problems. This can occur when the fuzzer generates a large number of test cases but does not restart the targeted product in between test cases. If an individual test case produces a crash, but it does not do so reliably, then an inability to handle resource exhaustion may be the cause. Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold. Ensure that protocols have specific limits of scale placed on them. Ensure that all failures in resource allocation place the system into a safe posture. Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190). Go-based workload orchestrator does not limit resource usage with unauthenticated connections, allowing a DoS by flooding the service Resource exhaustion in distributed OS because of "insufficient" IGMP queue management, as exploited in the wild per CISA KEV. Product allows attackers to cause a crash via a large number of connections. Malformed request triggers uncontrolled recursion, leading to stack exhaustion. Chain: memory leak (CWE-404) leads to resource exhaustion. Driver does not use a maximum width when invoking sscanf style functions, causing stack consumption. Large integer value for a length property in an object causes a large amount of memory allocation. Web application firewall consumes excessive memory when an HTTP request contains a large Content-Length value but no POST data. Product allows exhaustion of file descriptors when processing a large number of TCP packets. Communication product allows memory consumption with a large number of SIP requests, which cause many sessions to be created. TCP implementation allows attackers to consume CPU and prevent new connections using a TCP SYN flood attack. Port scan triggers CPU consumption with processes that attempt to read data from closed sockets. Product allows attackers to cause a denial of service via a large number of directives, each of which opens a separate window. Product allows resource exhaustion via a large number of calls that do not complete a 3-way handshake. Mail server does not properly handle deeply nested multipart MIME messages, leading to stack exhaustion. Chain: anti-virus product encounters a malformed file but returns from a function without closing a file descriptor (CWE-775) leading to file descriptor consumption (CWE-400) and failed scans.

CWE-787 : Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer. At the point when the product writes data to an invalid location, it is likely that a separate weakness already occurred earlier. For example, the product might alter an index, perform incorrect pointer arithmetic, initialize or release memory incorrectly, etc., thus referencing a memory location outside the buffer. Often used to describe the consequences of writing to memory outside the bounds of a buffer, or to memory that is otherwise invalid. This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results. Use tools that are integrated duringcompilation to insert runtime error-checking mechanismsrelated to memory safety errors, such as AddressSanitizer(ASan) for C/C++ [REF-1518]. Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available. Font rendering library does not properlyhandle assigning a signed short value to an unsignedlong (CWE-195), leading to an integer wraparound(CWE-190), causing too small of a buffer (CWE-131),leading to an out-of-bounds write(CWE-787). The reference implementation code for a Trusted Platform Module does not implement length checks on data, allowing for an attacker to write 2 bytes past the end of a buffer. Chain: insufficient input validation (CWE-20) in browser allows heap corruption (CWE-787), as exploited in the wild per CISA KEV. GPU kernel driver allows memory corruption because a user can obtain read/write access to read-only pages, as exploited in the wild per CISA KEV. Chain: integer truncation (CWE-197) causes small buffer allocation (CWE-131) leading to out-of-bounds write (CWE-787) in kernel pool, as exploited in the wild per CISA KEV. Out-of-bounds write in kernel-mode driver, as exploited in the wild per CISA KEV. Escape from browser sandbox using out-of-bounds write due to incorrect bounds check, as exploited in the wild per CISA KEV. Memory corruption in web browser scripting engine, as exploited in the wild per CISA KEV. chain: mobile phone Bluetooth implementation does not include offset when calculating packet length (CWE-682), leading to out-of-bounds write (CWE-787) Chain: compiler optimization (CWE-733) removes or modifies code used to detect integer overflow (CWE-190), allowing out-of-bounds write (CWE-787). malformed inputs cause accesses of uninitialized or previously-deleted objects, leading to memory corruption chain: -1 value from a function call was intended to indicate an error, but is used as an array index instead. Unchecked length of SSLv2 challenge value leads to buffer underflow. Buffer underflow from a small size value with a large buffer (length parameter inconsistency, CWE-130) Chain: integer signedness error (CWE-195) passes signed comparison, leading to heap overflow (CWE-122) Classic stack-based buffer overflow in media player using a long entry in a playlist Heap-based buffer overflow in media player using a long entry in a playlist

References


 

AFFECTED (from MITRE)


Vendor Product Versions
Google Protocol Buffers
  • < 28.2 [affected]
Google protobuf-java
  • < 3.25.5 [affected]
  • < 4.27.5 [affected]
  • < 4.28.2 [affected]
Google protobuf-javalite
  • < 3.25.5 [affected]
  • < 4.27.5 [affected]
  • < 4.28.2 [affected]
Google protobuf-kotlin
  • < 3.25.5 [affected]
  • < 4.27.5 [affected]
  • < 4.28.2 [affected]
Google protobuf-kotllin-lite
  • < 3.25.5 [affected]
  • < 4.27.5 [affected]
  • < 4.28.2 [affected]
Google google-protobuf [JRuby Gem]
  • < 3.25.5 [affected]
  • < 4.27.5 [affected]
  • < 4.28.2 [affected]
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

CPE

cpe start end
Configuration 1
cpe:2.3:a:google:protobuf:*:*:*:*:*:ruby:*:* < 3.25.5
cpe:2.3:a:google:protobuf:*:*:*:*:*:ruby:*:* >= 4.0.0 < 4.27.5
cpe:2.3:a:google:protobuf:*:*:*:*:*:ruby:*:* >= 4.28.0 < 4.28.2
cpe:2.3:a:google:protobuf-java:*:*:*:*:*:*:*:* < 3.25.5
cpe:2.3:a:google:protobuf-java:*:*:*:*:*:*:*:* >= 4.0.0 < 4.27.5
cpe:2.3:a:google:protobuf-java:*:*:*:*:*:*:*:* >= 4.28.0 < 4.28.2
cpe:2.3:a:google:protobuf-javalite:*:*:*:*:*:*:*:* < 3.25.5
cpe:2.3:a:google:protobuf-javalite:*:*:*:*:*:*:*:* >= 4.0.0 < 4.27.5
cpe:2.3:a:google:protobuf-javalite:*:*:*:*:*:*:*:* >= 4.28.0 < 4.28.2
cpe:2.3:a:google:protobuf-kotlin:*:*:*:*:*:*:*:* < 3.25.5
cpe:2.3:a:google:protobuf-kotlin:*:*:*:*:*:*:*:* >= 4.0.0 < 4.27.5
cpe:2.3:a:google:protobuf-kotlin:*:*:*:*:*:*:*:* >= 4.28.0 < 4.28.2
cpe:2.3:a:google:protobuf-kotlin-lite:*:*:*:*:*:*:*:* < 3.25.5
cpe:2.3:a:google:protobuf-kotlin-lite:*:*:*:*:*:*:*:* >= 4.0.0 < 4.27.5
cpe:2.3:a:google:protobuf-kotlin-lite:*:*:*:*:*:*:*:* >= 4.28.0 <= 4.28.2
Configuration 2
cpe:2.3:a:netapp:active_iq_unified_manager:-:*:*:*:*:linux:*:*
cpe:2.3:a:netapp:active_iq_unified_manager:-:*:*:*:*:vmware_vsphere:*:*
cpe:2.3:a:netapp:active_iq_unified_manager:-:*:*:*:*:windows:*:*
cpe:2.3:a:netapp:bluexp:-:*:*:*:*:*:*:*
cpe:2.3:a:netapp:ontap_tools:10:*:*:*:*:vmware_vsphere:*:*


REMEDIATION


Patch

Url
https://github.com/protocolbuffers/protobuf/commit/cc8b3483a5584b3301e3d43d17...


EXPLOITS


Exploit-db.com

id description date
No known exploits

POC Github

Url
No known exploits

Other Nist (github, ...)

Url
No known exploits


CAPEC


Common Attack Pattern Enumerations and Classifications

id description severity
147 XML Ping of the Death
Medium
227 Sustained Client Engagement
492 Regular Expression Exponential Blowup


MITRE


Techniques

id description
T1499 Endpoint Denial of Service
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

Mitigations

id description
M1037 Leverage services provided by Content Delivery Networks (CDN) or providers specializing in DoS mitigations to filter traffic upstream from services. Filter boundary traffic by blocking source addresses sourcing the attack, blocking ports that are being targeted, or blocking protocols being used for transport. To defend against SYN floods, enable SYN Cookies.
© 2022 The MITRE Corporation. Esta obra se reproduce y distribuye con el permiso de The MITRE Corporation.