CVE-2021-35517

Severity

75%

Complexity

39%

Confidentiality

60%

When reading a specially crafted TAR archive, Compress can be made to allocate large amounts of memory that finally leads to an out of memory error even for very small inputs. This could be used to mount a denial of service attack against services that use Compress' tar package.

CVSS 3.1 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

CVSS 2.0 Base Score 5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:N/I:N/A:P).

Demo Examples

Allocation of Resources Without Limits or Throttling

CWE-770

This code allocates a socket and forks each time it receives a new connection.


               
}
pid = fork();

The program does not track how many connections have been made, and it does not limit the number of connections. Because forking is a relatively expensive operation, an attacker would be able to cause the system to run out of CPU, processes, or memory by making a large number of connections. Alternatively, an attacker could consume all available connections, preventing others from accessing the system remotely.

Allocation of Resources Without Limits or Throttling

CWE-770

In the following example a server socket connection is used to accept a request to store data on the local file system using a specified filename. The method openSocketConnection establishes a server socket to accept requests from a client. When a client establishes a connection to this service the getNextMessage method is first used to retrieve from the socket the name of the file to store the data, the openFileToWrite method will validate the filename and open a file to write to on the local file system. The getNextMessage is then used within a while loop to continuously read data from the socket and output the data to the file until there is no longer any data from the socket.


               
}
closeSocket(socket);
return(FAIL);
closeFile();
}
break;

This example creates a situation where data can be dumped to a file on the local file system without any limits on the size of the file. This could potentially exhaust file or disk resources and/or limit other clients' ability to access the service.

Allocation of Resources Without Limits or Throttling

CWE-770

In the following example, the processMessage method receives a two dimensional character array containing the message to be processed. The two-dimensional character array contains the length of the message in the first character array and the message body in the second character array. The getMessageLength method retrieves the integer value of the length from the first character array. After validating that the message length is greater than zero, the body character array pointer points to the start of the second character array of the two-dimensional character array and memory is allocated for the new body character array.


               
}/* process message accepts a two-dimensional character array of the form [length][body] containing the message to be processed */
}
return(SUCCESS);
return(FAIL);

This example creates a situation where the length of the body character array can be very large and will consume excessive memory, exhausting system resources. This can be avoided by restricting the length of the second character array with a maximum length check

Also, consider changing the type from 'int' to 'unsigned int', so that you are always guaranteed that the number is positive. This might not be possible if the protocol specifically requires allowing negative values, or if you cannot control the return value from getMessageLength(), but it could simplify the check to ensure the input is positive, and eliminate other errors such as signed-to-unsigned conversion errors (CWE-195) that may occur elsewhere in the code.


               
if ((length > 0) && (length < MAX_LENGTH)) {...}

Allocation of Resources Without Limits or Throttling

CWE-770

In the following example, a server object creates a server socket and accepts client connections to the socket. For every client connection to the socket a separate thread object is generated using the ClientSocketThread class that handles request made by the client through the socket.


               
}
} catch (IOException ex) {...}
serverSocket.close();
t.start();

In this example there is no limit to the number of client connections and client threads that are created. Allowing an unlimited number of client connections and threads could potentially overwhelm the system and system resources.

The server should limit the number of client connections and the client threads that are created. This can be easily done by creating a thread pool object that limits the number of threads that are generated.


               
}
} catch (IOException ex) {...}
serverSocket.close();
pool.execute(t);

Allocation of Resources Without Limits or Throttling

CWE-770

Allocation of Resources Without Limits or Throttling

CWE-770

Here the problem is that every time a connection is made, more memory is allocated. So if one just opened up more and more connections, eventually the machine would run out of memory.


               
}
return foo;
free(foo);
endConnection(foo)
foo=connection();

Overview

First reported 3 years ago

2021-07-13 08:15:00

Last updated 3 years ago

2021-12-02 20:56:00

Affected Software

NetApp Active IQ Unified Manager for VMware vSphere

vmware_vsphere

NetApp Active IQ Unified Manager for Windows

windows

Oracle PeopleSoft Enterprise PeopleTools 8.57

8.57

Oracle PeopleSoft Enterprise PeopleTools 8.58

8.58

Oracle Primavera Unifier 18.8

18.8

Oracle Communications Messaging Server 8.1

8.1

References

https://commons.apache.org/proper/commons-compress/security-reports.html

https://lists.apache.org/thread.html/r605d906b710b95f1bbe0036a53ac6968f667f2c249b6fbabada9a940%40%3Cuser.commons.apache.org%3E

[oss-security] 20210713 CVE-2021-35517: Apache Commons Compress 1.1 to 1.20 denial of service vulnerability

[announce] 20210713 CVE-2021-35517: Apache Commons Compress 1.1 to 1.20 denial of service vulnerability

[ant-user] 20210713 CVE-2021-36373: Apache Ant TAR archive denial of service vulnerability

[announce] 20210713 CVE-2021-36373: Apache Ant TAR archive denial of service vulnerability

[oss-security] 20210713 CVE-2021-36373: Apache Ant TAR archive denial of service vulnerability

[pulsar-commits] 20210716 [GitHub] [pulsar] lhotari opened a new pull request #11345: [Security] Upgrade commons-compress to 1.21

https://commons.apache.org/proper/commons-compress/security-reports.html

Vendor Advisory

https://lists.apache.org/thread.html/r605d906b710b95f1bbe0036a53ac6968f667f2c249b6fbabada9a940%40%3Cuser.commons.apache.org%3E

Mailing List, Vendor Advisory

[oss-security] 20210713 CVE-2021-35517: Apache Commons Compress 1.1 to 1.20 denial of service vulnerability

Mailing List, Third Party Advisory

[announce] 20210713 CVE-2021-35517: Apache Commons Compress 1.1 to 1.20 denial of service vulnerability

Mailing List, Vendor Advisory

[ant-user] 20210713 CVE-2021-36373: Apache Ant TAR archive denial of service vulnerability

Mailing List, Not Applicable, Vendor Advisory

[announce] 20210713 CVE-2021-36373: Apache Ant TAR archive denial of service vulnerability

Mailing List, Not Applicable, Vendor Advisory

[oss-security] 20210713 CVE-2021-36373: Apache Ant TAR archive denial of service vulnerability

Mailing List, Third Party Advisory

[pulsar-commits] 20210716 [GitHub] [pulsar] lhotari opened a new pull request #11345: [Security] Upgrade commons-compress to 1.21

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210802 [GitHub] [skywalking] wu-sheng opened a new pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

[skywalking-notifications] 20210802 [skywalking] 01/01: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

[skywalking-notifications] 20210803 [GitHub] [skywalking] codecov[bot] edited a comment on pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

[skywalking-notifications] 20210803 [GitHub] [skywalking] hanahmily merged pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

[skywalking-notifications] 20210802 [GitHub] [skywalking] codecov[bot] edited a comment on pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

[skywalking-notifications] 20210803 [skywalking] branch master updated: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090 (#7400)

[skywalking-notifications] 20210802 [GitHub] [skywalking] codecov[bot] commented on pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

[flink-issues] 20210908 [GitHub] [flink] MartijnVisser opened a new pull request #17194: [FLINK-24034] Upgrade commons-compress to 1.21 and other apache.commons updates

[skywalking-notifications] 20210802 [GitHub] [skywalking] wu-sheng opened a new pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210802 [skywalking] 01/01: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210803 [GitHub] [skywalking] codecov[bot] edited a comment on pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210803 [GitHub] [skywalking] hanahmily merged pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210802 [GitHub] [skywalking] codecov[bot] edited a comment on pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210803 [skywalking] branch master updated: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090 (#7400)

Mailing List, Patch, Vendor Advisory

[skywalking-notifications] 20210802 [GitHub] [skywalking] codecov[bot] commented on pull request #7400: Fix CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090

Mailing List, Patch, Vendor Advisory

[flink-issues] 20210908 [GitHub] [flink] MartijnVisser opened a new pull request #17194: [FLINK-24034] Upgrade commons-compress to 1.21 and other apache.commons updates

Mailing List, Patch, Vendor Advisory

[poi-dev] 20210923 Re: [VOTE] Apache POI 5.1.0 release (RC1)

https://www.oracle.com/security-alerts/cpuoct2021.html

https://security.netapp.com/advisory/ntap-20211022-0001/

[poi-dev] 20210923 Re: [VOTE] Apache POI 5.1.0 release (RC1)

Mailing List, Vendor Advisory

https://www.oracle.com/security-alerts/cpuoct2021.html

Patch, Third Party Advisory

https://security.netapp.com/advisory/ntap-20211022-0001/

Third Party Advisory

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.