CVE-2020-1600 - Uncontrolled Resource Consumption

Severity

65%

Complexity

27%

Confidentiality

60%

In a Point-to-Multipoint (P2MP) Label Switched Path (LSP) scenario, an uncontrolled resource consumption vulnerability in the Routing Protocol Daemon (RPD) in Juniper Networks Junos OS allows a specific SNMP request to trigger an infinite loop causing a high CPU usage Denial of Service (DoS) condition. This issue affects both SNMP over IPv4 and IPv6. This issue affects: Juniper Networks Junos OS: 12.3X48 versions prior to 12.3X48-D90; 15.1 versions prior to 15.1R7-S6; 15.1X49 versions prior to 15.1X49-D200; 15.1X53 versions prior to 15.1X53-D238, 15.1X53-D592; 16.1 versions prior to 16.1R7-S5; 16.2 versions prior to 16.2R2-S11; 17.1 versions prior to 17.1R3-S1; 17.2 versions prior to 17.2R3-S2; 17.3 versions prior to 17.3R3-S7; 17.4 versions prior to 17.4R2-S4, 17.4R3; 18.1 versions prior to 18.1R3-S5; 18.2 versions prior to 18.2R3; 18.2X75 versions prior to 18.2X75-D50; 18.3 versions prior to 18.3R2; 18.4 versions prior to 18.4R2; 19.1 versions prior to 19.1R2.

In a Point-to-Multipoint (P2MP) Label Switched Path (LSP) scenario, an uncontrolled resource consumption vulnerability in the Routing Protocol Daemon (RPD) in Juniper Networks Junos OS allows a specific SNMP request to trigger an infinite loop causing a high CPU usage Denial of Service (DoS) condition. This issue affects both SNMP over IPv4 and IPv6. This issue affects: Juniper Networks Junos OS: 12.3X48 versions prior to 12.3X48-D90; 15.1 versions prior to 15.1R7-S6; 15.1X49 versions prior to 15.1X49-D200; 15.1X53 versions prior to 15.1X53-D238, 15.1X53-D592; 16.1 versions prior to 16.1R7-S5; 16.2 versions prior to 16.2R2-S11; 17.1 versions prior to 17.1R3-S1; 17.2 versions prior to 17.2R3-S2; 17.3 versions prior to 17.3R3-S7; 17.4 versions prior to 17.4R2-S4, 17.4R3; 18.1 versions prior to 18.1R3-S5; 18.2 versions prior to 18.2R3; 18.2X75 versions prior to 18.2X75-D50; 18.3 versions prior to 18.3R2; 18.4 versions prior to 18.4R2; 19.1 versions prior to 19.1R2.

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

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

Demo Examples

Uncontrolled Resource Consumption

CWE-400

The following example demonstrates the weakness.


               
}
}
}
...
Thread.currentThread().interrupt();// postpone response
...
new Thread(loop).start();
}
}
}
r.run();
...

There are no limits to runnables. Potentially an attacker could cause resource problems very quickly.

Uncontrolled Resource Consumption

CWE-400

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.

Uncontrolled Resource Consumption

CWE-400

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.

Uncontrolled Resource Consumption

CWE-400

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)) {...}

Uncontrolled Resource Consumption

CWE-400

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);

Overview

Type

Juniper

First reported 5 years ago

2020-01-15 09:15:00

Last updated 5 years ago

2020-01-23 19:35:00

Affected Software

Juniper JunOS 12.3x48 D10

12.3x48

Juniper JunOS 12.3x48 D15

12.3x48

Juniper Junos OS 12.3X48 D20

12.3x48

Juniper Junos 12.3X48 D25

12.3x48

Juniper Junos OS 12.3X48 D30

12.3x48

Juniper Junos OS 12.3X48 D35

12.3x48

Juniper Junos OS 12.3X48 D40

12.3x48

Juniper Junos OS 12.3X48 D45

12.3x48

Juniper Junos OS 12.3X48 D50

12.3x48

Juniper Junos OS 12.3X48 D55

12.3x48

Juniper Junos OS 12.3X48 D60

12.3x48

Juniper Junos OS 12.3X48 D65

12.3x48

Juniper Junos OS 12.3X48 D70

12.3x48

Juniper Junos OS 12.3X48 D75

12.3x48

Juniper JunOS 12.3x48 D80

12.3x48

Juniper Junos OS 15.1 R7

15.1

Juniper JUNOS 15.1 R7-S1

15.1

Juniper JUNOS 15.1 R7-S2

15.1

Juniper JUNOS 15.1 R7-S3

15.1

Juniper Junos OS 15.1 R7-s4

15.1

Juniper Junos OS 15.1 R7-s5

15.1

Juniper JunOS 15.1x49 D10

15.1x49

Juniper JunOS 15.1x49 D150

15.1x49

Juniper JunOS 15.1x49 D20

15.1x49

Juniper JunOS 15.1X49 D30

15.1x49

Juniper Junos 15.1X49 D35

15.1x49

Juniper JunOS 15.1X49 D40

15.1x49

Juniper JunOS 15.1X49 D45

15.1x49

Juniper JunOS 15.1X49 D50

15.1x49

Juniper JunOS 15.1X49 D55

15.1x49

Juniper JunOS 15.1X49 D60

15.1x49

Juniper JunOS 15.1X49 D65

15.1x49

Juniper JunOS 15.1X49 D70

15.1x49

Juniper JunOS 15.1X49 D75

15.1x49

Juniper JunOS 15.1X49 D80

15.1x49

Juniper Junos 15.1X53 D20

15.1x53

Juniper Junos 15.1X53 D21

15.1x53

Juniper JunOS 15.1X53 D210

15.1x53

Juniper JunOS 15.1X53 D25

15.1x53

Juniper Junos 15.1X53 D30

15.1x53

Juniper JUNOS 15.1X53 D31

15.1x53

Juniper Junos 15.1X53 D32

15.1x53

Juniper Junos 15.1X53 D33

15.1x53

Juniper Junos 15.1X53 D34

15.1x53

Juniper JunOS 15.1X53 D40

15.1x53

Juniper JunOS 15.1X53 D45

15.1x53

Juniper JUNOS 15.1X53 D470

15.1x53

Juniper JUNOS 15.1x53 D495

15.1x53

Juniper Junos 15.1x53 D56

15.1x53

Juniper JunOS 15.1X53 D60

15.1x53

Juniper JunOS 15.1X53 D61

15.1x53

Juniper JunOS 15.1X53 D62

15.1x53

Juniper JunOS 15.1X53 D63

15.1x53

Juniper JUNOS 15.1x53 D65

15.1x53

Juniper JunOS 15.1X53 D70

15.1x53

Juniper JUNOS 16.1

16.1

Juniper JunOS 16.1 R1

16.1

Juniper JunOS 16.1 R2

16.1

Juniper JunOS 16.1 R3

16.1

Juniper Junos 16.1 R3-S10

16.1

Juniper JunOS 16.1 R4

16.1

Juniper Junos 16.1 R5

16.1

Juniper Junos 16.1 R5-S4

16.1

Juniper Junos 16.1 R6-S1

16.1

Juniper Junos 16.1 R7

16.1

Juniper JUNOS 16.1 R7-S2

16.1

Juniper JUNOS 16.1 R7-S3

16.1

Juniper JUNOS 16.1R7-S4

16.1

Juniper JUNOS 16.2

16.2

Juniper JunOS 16.2 R1

16.2

Juniper JunOS 16.2 R2

16.2

Juniper Junos 16.2 R2-S1

16.2

Juniper JUNOS 16.2 R2-S10

16.2

Juniper JUNOS 16.2 R2-S2

16.2

Juniper Junos 16.2 R2-S5

16.2

Juniper JUNOS 16.2 R2-S6

16.2

Juniper JUNOS 16.2 R2-S7

16.2

Juniper JUNOS 16.2R2-S8

16.2

Juniper JUNOS 16.2 R2-S9

16.2

Juniper JUNOS 17.1

17.1

Juniper JunOS 17.1 R1

17.1

Juniper Junos 17.1 R2-S1

17.1

Juniper JUNOS 17.1 R2-S10

17.1

Juniper JUNOS 17.1 R2-S2

17.1

Juniper JUNOS 17.1 R2-S3

17.1

Juniper JUNOS 17.1 R2-S4

17.1

Juniper JUNOS 17.1 R2-S5

17.1

Juniper JUNOS 17.1 R2-S6

17.1

Juniper Junos 17.1 R2-S7

17.1

Juniper JunOS 17.1 R2-s9

17.1

Juniper JUNOS 17.2

17.2

Juniper JUNOS 17.2 R1-S2

17.2

Juniper JUNOS 17.2 R1-S4

17.2

Juniper Junos 17.2 R1-S7

17.2

Juniper JUNOS 17.2 R1-S8

17.2

Juniper JUNOS 17.2 R2-S6

17.2

Juniper JUNOS 17.2 R2-S7

17.2

Juniper JUNOS 17.2R3-S1

17.2

Juniper JUNOS 17.3

17.3

Juniper JUNOS 17.3 R1-S1

17.3

Juniper Junos 17.3 R2

17.3

Juniper JUNOS 17.3 R2-S1

17.3

Juniper JUNOS 17.3R2-S2

17.3

Juniper JUNOS 17.3 R3-S1

17.3

Juniper JUNOS 17.3 R3-S2

17.3

Juniper JUNOS 17.3 R3-S3

17.3

Juniper JUNOS 17.3R3-S4

17.3

Juniper JUNOS 17.4

17.4

Juniper Junos 17.4 R1

17.4

Juniper JUNOS 17.4 R1-S1

17.4

Juniper JUNOS 17.4 R1-S2

17.4

Juniper JUNOS 17.4R1-S4

17.4

Juniper JUNOS 17.4 R1-S6

17.4

Juniper JUNOS 17.4R1-S7

17.4

Juniper Junos 17.4 R2

17.4

Juniper JUNOS 17.4 R2-S1

17.4

Juniper JUNOS 17.4 R2-S3

17.4

Juniper JUNOS 18.1

18.1

Juniper JUNOS 18.1R2

18.1

Juniper JUNOS R2-S1

18.1

Juniper JUNOS R2-S2

18.1

Juniper JUNOS 18.1 R2-S4

18.1

Juniper JUNOS 18.1 R3

18.1

Juniper JUNOS 18.1 R3-S2

18.1

Juniper JUNOS 18.1 R3-S3

18.1

Juniper JUNOS 18.1R3-S4

18.1

Juniper JUNOS 18.2

18.2

Juniper JUNOS 18.2 R1-S5

18.2

Juniper JUNOS 18.2 R2-S1

18.2

Juniper JUNOS 18.2R2-S2

18.2

Juniper JUNOS 18.2R2-S3

18.2

Juniper JUNOS18.2 R2-S4

18.2

Juniper JUNOS 18.2 R2-S5

18.2

Juniper JUNOS 18.2 R2-S6

18.2

Juniper Junos 18.2x75 -

18.2x75

Juniper JUNOS 18.2x75 D20

18.2x75

Juniper JUNOS 18.2X75-D40

18.2x75

Juniper JUNOS 18.3

18.3

Juniper JUNOS 18.3 R1

18.3

Juniper JUNOS 18.3 R1-S1

18.3

Juniper JUNOS 18.3 R1-S2

18.3

Juniper JUNOS 18.3R1-S3

18.3

Juniper JUNOS 18.3 R2

18.3

Juniper JUNOS 18.4

18.4

Juniper JunOS 18.4 R1

18.4

Juniper Junos OS 18.4 R1-S1

18.4

Juniper JUNOS 18.4R1-S2

18.4

Juniper JUNOS 18.4 R1-S5

18.4

Juniper Junos OS 19.1 R1

19.1

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.