5.5 CVE-2022-1325
DOS Patch Exploit
A flaw was found in Clmg, where with the help of a maliciously crafted pandore or bmp file with modified dx and dy header field values it is possible to trick the application into allocating huge buffer sizes like 64 Gigabyte upon reading the file from disk or from a virtual buffer.
https://nvd.nist.gov/vuln/detail/CVE-2022-1325
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-770 : Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. Manual static analysis can be useful for finding this weakness, but it might not achieve desired code coverage within limited time constraints. If denial-of-service is not considered a significant risk, or if there is strong emphasis on consequences such as code execution, then manual analysis may not focus on this weakness at all. Certain automated dynamic analysis techniques may be effective in producing side effects of uncontrolled resource allocation 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. Manual analysis is likely required to interpret the results. Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits. Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410. 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, and it will help the administrator to identify who is committing the abuse. 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. 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. Ensure that protocols have specific limits of scale placed on them. 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). Language interpreter does not restrict the number of temporary files being created when handling a MIME request with a large number of parts.. 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. 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. Product allows attackers to cause a denial of service via a large number of directives, each of which opens a separate window. CMS does not restrict the number of searches that can occur simultaneously, leading to resource exhaustion. web application scanner attempts to read an excessively large file created by a user, causing process termination Go-based workload orchestrator does not limit resource usage with unauthenticated connections, allowing a DoS by flooding the service
References
af854a3a-2127-422b-91ae-364da2661108 Patch Exploit
https://access.redhat.com/security/cve/CVE-2022-1325 Broken Link |
https://bugzilla.redhat.com/show_bug.cgi?id=2074549 Exploit Issue Tracking Patch Third Party Advisory |
https://github.com/GreycLab/CImg/commit/619cb58dd90b4e03ac68286c70ed98acbefd1c90 Patch Third Party Advisory |
https://github.com/GreycLab/CImg/issues/343 Exploit Issue Tracking Third Party Advisory |
https://github.com/GreycLab/CImg/pull/348 Patch Third Party Advisory |
https://huntr.dev/bounties/a5e4fc45-8f14-4dd1-811b-740fc50c95d2/ Exploit Third Party Advisory |
secalert@redhat.com Patch Exploit
https://access.redhat.com/security/cve/CVE-2022-1325 Broken Link |
https://bugzilla.redhat.com/show_bug.cgi?id=2074549 Exploit Issue Tracking Patch Third Party Advisory |
https://github.com/GreycLab/CImg/commit/619cb58dd90b4e03ac68286c70ed98acbefd1c90 Patch Third Party Advisory |
https://github.com/GreycLab/CImg/issues/343 Exploit Issue Tracking Third Party Advisory |
https://github.com/GreycLab/CImg/pull/348 Patch Third Party Advisory |
https://huntr.dev/bounties/a5e4fc45-8f14-4dd1-811b-740fc50c95d2/ Exploit Third Party Advisory |
CPE
cpe | start | end |
---|---|---|
Configuration 1 | ||
cpe:2.3:a:cimg:cimg:*:*:*:*:*:*:*:* | < 3.1.0 |
REMEDIATION
Patch
EXPLOITS
Exploit-db.com
id | description | date | |
---|---|---|---|
No known exploits |
POC Github
Url |
---|
No known exploits |
Other Nist (github, ...)
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 |
|
125 | Flooding |
Medium |
130 | Excessive Allocation |
Medium |
197 | Exponential Data Expansion |
Medium |
229 | Serialized Data Parameter Blowup |
High |
230 | Serialized Data with Nested Payloads |
High |
231 | Oversized Serialized Data Payloads |
High |
469 | HTTP DoS |
Low |
482 | TCP Flood |
|
486 | UDP Flood |
|
487 | ICMP Flood |
|
488 | HTTP Flood |
|
489 | SSL Flood |
|
490 | Amplification |
|
491 | Quadratic Data Expansion |
|
493 | SOAP Array Blowup |
|
494 | TCP Fragmentation |
|
495 | UDP Fragmentation |
|
496 | ICMP Fragmentation |
|
528 | XML Flood |
Medium |
MITRE
Techniques
id | description |
---|---|
T1498.001 | Network Denial of Service: Direct Network Flood |
T1498.002 | Network Denial of Service:Reflection Amplification |
T1499 | Endpoint Denial of Service |
T1499.001 | Endpoint Denial of Service: OS Exhaustion Flood |
T1499.002 | Endpoint Denial of Service: Service Exhaustion Flood |
T1499.003 | Endpoint Denial of Service:Application Exhaustion Flood |
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. |
Mitigations
id | description |
---|---|
M1037 | When flood volumes exceed the capacity of the network connection being targeted, it is typically necessary to intercept the incoming traffic upstream to filter out the attack traffic from the legitimate traffic. Such defenses can be provided by the hosting Internet Service Provider (ISP) or by a 3rd party such as a Content Delivery Network (CDN) or providers specializing in DoS mitigations. Depending on flood volume, on-premises filtering may be possible by blocking source addresses sourcing the attack, blocking ports that are being targeted, or blocking protocols being used for transport. As immediate response may require rapid engagement of 3rd parties, analyze the risk associated to critical resources being affected by Network DoS attacks and create a disaster recovery plan/business continuity plan to respond to incidents. |
M1037 | When flood volumes exceed the capacity of the network connection being targeted, it is typically necessary to intercept the incoming traffic upstream to filter out the attack traffic from the legitimate traffic. Such defenses can be provided by the hosting Internet Service Provider (ISP) or by a 3rd party such as a Content Delivery Network (CDN) or providers specializing in DoS mitigations. Depending on flood volume, on-premises filtering may be possible by blocking source addresses sourcing the attack, blocking ports that are being targeted, or blocking protocols being used for transport. As immediate response may require rapid engagement of 3rd parties, analyze the risk associated to critical resources being affected by Network DoS attacks and create a disaster recovery plan/business continuity plan to respond to incidents. |
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. |
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. |
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. |
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. |
© 2022 The MITRE Corporation. Esta obra se reproduce y distribuye con el permiso de The MITRE Corporation. |
Cybersecurity needs ?
Strengthen software security from the outset with our DevSecOps expertise
Integrate security right from the start of the software development cycle for more robust applications and greater customer confidence.
Our team of DevSecOps experts can help you secure your APIs, data pipelines, CI/CD chains, Docker containers and Kubernetes deployments.