CVE-2017-2315 - Missing Release of Resource after Effective Lifetime

Severity

78%

Complexity

99%

Confidentiality

115%

On Juniper Networks EX Series Ethernet Switches running affected Junos OS versions, a vulnerability in IPv6 processing has been discovered that may allow a specially crafted IPv6 Neighbor Discovery (ND) packet destined to an EX Series Ethernet Switch to cause a slow memory leak. A malicious network-based packet flood of these crafted IPv6 NDP packets may eventually lead to resource exhaustion and a denial of service. The affected Junos OS versions are: 12.3 prior to 12.3R12-S4, 12.3R13; 13.3 prior to 13.3R10; 14.1 prior to 14.1R8-S3, 14.1R9; 14.1X53 prior ro 14.1X53-D12, 14.1X53-D40; 14.1X55 prior to 14.1X55-D35; 14.2 prior to 14.2R6-S4, 14.2R7-S6, 14.2R8; 15.1 prior to 15.1R5; 16.1 before 16.1R3; 16.2 before 16.2R1-S3, 16.2R2. 17.1R1 and all subsequent releases have a resolution for this vulnerability.

On Juniper Networks EX Series Ethernet Switches running affected Junos OS versions, a vulnerability in IPv6 processing has been discovered that may allow a specially crafted IPv6 Neighbor Discovery (ND) packet destined to an EX Series Ethernet Switch to cause a slow memory leak. A malicious network-based packet flood of these crafted IPv6 NDP packets may eventually lead to resource exhaustion and a denial of service. The affected Junos OS versions are: 12.3 prior to 12.3R12-S4, 12.3R13; 13.3 prior to 13.3R10; 14.1 prior to 14.1R8-S3, 14.1R9; 14.1X53 prior ro 14.1X53-D12, 14.1X53-D40; 14.1X55 prior to 14.1X55-D35; 14.2 prior to 14.2R6-S4, 14.2R7-S6, 14.2R8; 15.1 prior to 15.1R5; 16.1 before 16.1R3; 16.2 before 16.2R1-S3, 16.2R2. 17.1R1 and all subsequent releases have a resolution for this vulnerability.

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

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

Demo Examples

Missing Release of Resource after Effective Lifetime

CWE-772

The following code attempts to process a file by reading it in line by line until the end has been reached.


               
}
}
processLine(line);

The problem with the above code is that it never closes the file handle it opens. The Finalize() method for BufferReader eventually calls Close(), but there is no guarantee as to how long it will take before the Finalize() method is invoked. In fact, there is no guarantee that Finalize() will ever be invoked. In a busy environment, this can result in the VM using up all of its available file handles.

Missing Release of Resource after Effective Lifetime

CWE-772

The following code attempts to open a new connection to a database, process the results returned by the database, and close the allocated SqlConnection object.


               
conn.Connection.Close();

The problem with the above code is that if an exception occurs while executing the SQL or processing the results, the SqlConnection object is not closed. If this happens often enough, the database will run out of available cursors and not be able to execute any more SQL queries.

Missing Release of Resource after Effective Lifetime

CWE-772

The following method never closes the file handle it opens. The Finalize() method for StreamReader eventually calls Close(), but there is no guarantee as to how long it will take before the Finalize() method is invoked. In fact, there is no guarantee that Finalize() will ever be invoked. In a busy environment, this can result in the VM using up all of its available file handles.


               
}
}
processLine(line);

Missing Release of Resource after Effective Lifetime

CWE-772

This code attempts to open a connection to a database and catches any exceptions that may occur.


               
}
Connection con = DriverManager.getConnection(some_connection_string);
log( e );

If an exception occurs after establishing the database connection and before the same connection closes, the pool of database connections may become exhausted. If the number of available connections is exceeded, other users cannot access this resource, effectively denying access to the application.

Missing Release of Resource after Effective Lifetime

CWE-772

Under normal conditions the following C# code executes a database query, processes the results returned by the database, and closes the allocated SqlConnection object. But if an exception occurs while executing the SQL or processing the results, the SqlConnection object is not closed. If this happens often enough, the database will run out of available cursors and not be able to execute any more SQL queries.


               
...

Missing Release of Resource after Effective Lifetime

CWE-772

The following C function does not close the file handle it opens if an error occurs. If the process is long-lived, the process can run out of file handles.


               
}
return DECODE_SUCCESS;
return DECODE_FAIL;
}
}
return DECODE_FAIL;
decodeBlock(buf);

Overview

Type

Juniper

First reported 7 years ago

2017-04-24 15:59:00

Last updated 5 years ago

2019-10-03 00:03:00

Affected Software

Juniper Junos 12.3 R1

12.3

Juniper JunOS 12.3 R10

12.3

Juniper Junos 12.3 R11

12.3

Juniper JunOS 12.3 R12

12.3

Juniper JunOS 12.3 R13

12.3

Juniper Junos 12.3 R2

12.3

Juniper Junos 12.3 R3

12.3

Juniper Junos 12.3 R4

12.3

Juniper Junos 12.3 R5

12.3

Juniper Junos 12.3 R6

12.3

Juniper JUNOS 12.3R7

12.3

Juniper Junos 12.3 R8

12.3

Juniper JunOS 12.3 R9

12.3

Juniper Junos 13.3 R1

13.3

Juniper Junos 13.3 R2

13.3

Juniper Junos 13.3 R3

13.3

Juniper Junos 13.3 R4

13.3

Juniper Junos 13.3 R5

13.3

Juniper JUNOS 13.3 R6

13.3

Juniper Junos 13.3 R7

13.3

Juniper Junos 13.3 R8

13.3

Juniper Junos 13.3 R9

13.3

Juniper JUNOS 14.1R1

14.1

Juniper Junos 14.1 R2

14.1

Juniper Junos 14.1 R3

14.1

Juniper JunOS 14.1 R4

14.1

Juniper Junos 14.1 R5

14.1

Juniper Junos 14.1 R6

14.1

Juniper Junos 14.1 R7

14.1

Juniper JunOS 14.1 R9

14.1

Juniper JunOS 14.1x53 D10

14.1x53

Juniper JunOS 14.1x53 D40

14.1x53

Juniper JunOS 14.1x55 D35

14.1x55

Juniper Junos 14.2 R1

14.2

Juniper Junos 14.2 R2

14.2

Juniper Junos 14.2 R3

14.2

Juniper Junos 14.2 R4

14.2

Juniper Junos 14.2 R5

14.2

Juniper JunOS 14.2 R7

14.2

Juniper Junos 14.2 R8

14.2

Juniper Junos 15.1 R1

15.1

Juniper JunOS 15.1 R2

15.1

Juniper Junos 15.1 R3

15.1

Juniper JunOS 15.1 R4

15.1

Juniper JunOS 16.1 R1

16.1

Juniper JunOS 16.2 R2

16.2

Juniper JunOS 17.1 R1

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