CVE-2021-0215 - Missing Release of Resource after Effective Lifetime

Severity

65%

Complexity

27%

Confidentiality

60%

On Juniper Networks Junos EX series, QFX Series and SRX branch series devices, a memory leak occurs every time the 802.1X authenticator port interface flaps which can lead to other processes, such as the pfex process, responsible for packet forwarding, to crash and restart. An administrator can use the following CLI command to monitor the status of memory consumption: user@device> show task memory detail Please refer to https://kb.juniper.net/KB31522 for details. This issue affects Juniper Networks Junos OS: 14.1X53 versions prior to 14.1X53-D54; 15.1X49 versions prior to 15.1X49-D240 ; 15.1X53 versions prior to 15.1X53-D593; 16.1 versions prior to 16.1R7-S8; 17.2 versions prior to 17.2R3-S4; 17.3 versions prior to 17.3R3-S8; 17.4 versions prior to 17.4R2-S11, 17.4R3-S2; 18.1 versions prior to 18.1R3-S10 ; 18.2 versions prior to 18.2R2-S7, 18.2R3-S3; 18.3 versions prior to 18.3R2-S4, 18.3R3-S2; 18.4 versions prior to 18.4R1-S7, 18.4R2-S4, 18.4R3-S2; 19.1 versions prior to 19.1R1-S5, 19.1R2-S2, 19.1R3; 19.2 versions prior to 19.2R1-S5, 19.2R2; 19.3 versions prior to 19.3R2-S3, 19.3R3; 19.4 versions prior to 19.4R1-S2, 19.4R2. This issue does not affect Juniper Networks Junos OS 12.3, 15.1.

On Juniper Networks Junos EX series, QFX Series, MX Series and SRX branch series devices, a memory leak occurs every time the 802.1X authenticator port interface flaps which can lead to other processes, such as the pfex process, responsible for packet forwarding, to crash and restart. An administrator can use the following CLI command to monitor the status of memory consumption: user@device> show task memory detail Please refer to https://kb.juniper.net/KB31522 for details. This issue affects Juniper Networks Junos OS: 14.1X53 versions prior to 14.1X53-D54; 15.1X49 versions prior to 15.1X49-D240 ; 15.1X53 versions prior to 15.1X53-D593; 16.1 versions prior to 16.1R7-S8; 17.2 versions prior to 17.2R3-S4; 17.3 versions prior to 17.3R3-S8; 17.4 versions prior to 17.4R2-S11, 17.4R3-S2; 18.1 versions prior to 18.1R3-S10 ; 18.2 versions prior to 18.2R2-S7, 18.2R3-S3; 18.3 versions prior to 18.3R2-S4, 18.3R3-S2; 18.4 versions prior to 18.4R1-S7, 18.4R2-S4, 18.4R3-S2; 19.1 versions prior to 19.1R1-S5, 19.1R2-S2, 19.1R3; 19.2 versions prior to 19.2R1-S5, 19.2R2; 19.3 versions prior to 19.3R2-S3, 19.3R3; 19.4 versions prior to 19.4R1-S2, 19.4R2. This issue does not affect Juniper Networks Junos OS 12.3, 15.1.

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

CVSS 2.0 Base Score 2.9. CVSS Attack Vector: adjacent_network. CVSS Attack Complexity: medium. CVSS Vector: (AV:A/AC:M/Au:N/C:N/I:N/A:P).

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 4 years ago

2021-01-15 18:15:00

Last updated 3 years ago

2021-03-17 14:19:00

Affected Software

Juniper JUNOS 18.2 R1

18.2

Juniper Junos 18.2 R1-S3

18.2

Juniper Junos 18.2 R1-S4

18.2

Juniper JUNOS 18.2 R2

18.2

Juniper JUNOS 14.1X53

14.1x53

Juniper JunOS 14.1x53 D10

14.1x53

Juniper JunOS 14.1x53 D15

14.1x53

Juniper JunOS 14.1x53 D16

14.1x53

Juniper JunOS 14.1x53 D25

14.1x53

Juniper JunOS 14.1x53 D26

14.1x53

Juniper Junos 14.1X53 D27

14.1x53

Juniper Junos 14.1X53 D30

14.1x53

Juniper Junos 14.1X53 D35

14.1x53

Juniper JunOS 14.1x53 D40

14.1x53

Juniper Junos 14.1X53 D42

14.1x53

Juniper Junos 14.1X53 D43

14.1x53

Juniper Junos 14.1X53 D44

14.1x53

Juniper JunOS 14.1X53 D45

14.1x53

Juniper JUNOS 14.1X53 D48

14.1x53

Juniper Junos 14.1X53 D50

14.1x53

Juniper JUNOS 14.1X53 D51

14.1x53

Juniper JUNOS 14.1X53 D52

14.1x53

Juniper JUNOS 14.1X53 D53

14.1x53

Juniper Junos OS 15.1X49

15.1x49

Juniper JunOS 15.1x49 D10

15.1x49

Juniper Junos OS 15.1X49 D100

15.1x49

Juniper Junos OS 15.1X49 D110

15.1x49

Juniper Junos OS 15.1X49 D120

15.1x49

Juniper Junos OS 15.1X49 D130

15.1x49

Juniper Junos OS 15.1X49 D140

15.1x49

Juniper JunOS 15.1X49 D15

15.1x49

Juniper JunOS 15.1x49 D150

15.1x49

Juniper Junos OS 15.1X49 D160

15.1x49

Juniper Junos OS 15.1X49 D170

15.1x49

Juniper Junos OS 15.1X49 D180

15.1x49

Juniper JUNOS 15.1X49 D190

15.1x49

Juniper JunOS 15.1x49 D20

15.1x49

Juniper JUNOS 15.1X49 D200

15.1x49

Juniper JUNOS 15.1X49 D210

15.1x49

Juniper JunOS 15.1X49 D25

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 OS 15.1X49 D90

15.1x49

Juniper Junos OS 15.1X53

15.1x53

Juniper Junos OS 15.1X53 D10

15.1x53

Juniper Junos 15.1X53 D20

15.1x53

Juniper Junos 15.1X53 D21

15.1x53

Juniper JunOS 15.1X53 D210

15.1x53

Juniper Junos OS 15.1X53 D230

15.1x53

Juniper Junos OS 15.1X53 D231

15.1x53

Juniper Junos OS 15.1X53 D232

15.1x53

Juniper Junos OS 15.1X53 D233

15.1x53

Juniper Junos OS 15.1X53 D234

15.1x53

Juniper Junos OS 15.1X53 D235

15.1x53

Juniper Junos OS 15.1X53 D236

15.1x53

Juniper Junos OS 15.1X53 D237

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 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 OS 16.1 R3-S11

16.1

Juniper JunOS 16.1 R4

16.1

Juniper JUNOS 16.1 R4-S12

16.1

Juniper JUNOS 16.1 R4-S2

16.1

Juniper Junos 16.1 R4-S3

16.1

Juniper Junos 16.1 R4-S4

16.1

Juniper JUNOS 16.1 R4-S6

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 R6-s6

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.1R7-S5

16.1

Juniper JUNOS 16.1 R7-S6

16.1

Juniper JUNOS 16.1 R7-S7

16.1

Juniper JUNOS 17.2

17.2

Juniper Junos 17.2 R1

17.2

Juniper JUNOS 17.2 R1-s1

17.2

Juniper JUNOS 17.2 R1-S2

17.2

Juniper JUNOS 17.2 R1-s3

17.2

Juniper JUNOS 17.2 R1-S4

17.2

Juniper JUNOS 17.2 R1-s5

17.2

Juniper Junos 17.2 R1-S7

17.2

Juniper JUNOS 17.2 R1-S8

17.2

Juniper Junos 17.2 R2

17.2

Juniper JUNOS 17.2 R2-S11

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.2 R3-S2

17.2

Juniper JUNOS 17.2 R3-S3

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 OS 17.3 R2-S3

17.3

Juniper JUNOS 17.3 R2-S4

17.3

Juniper JunOS 17.3 R3

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.3 R3-S7

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-s5

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-S10

17.4

Juniper Junos 17.4 R2-S2

17.4

Juniper JUNOS 17.4 R2-S3

17.4

Juniper JUNOS 17.4R2-S4

17.4

Juniper JUNOS 17.4 R2-S5

17.4

Juniper JUNOS 17.4 R2-S6

17.4

Juniper JUNOS 17.4 R2-S7

17.4

Juniper JUNOS 17.4 R2-S8

17.4

Juniper JUNOS 17.4 R2-S9

17.4

Juniper JUNOS 17.4 R3

17.4

Juniper JUNOS 17.4 R3-S1

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-s1

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.1 R3-S6

18.1

Juniper JUNOS 18.1 R3-S7

18.1

Juniper JUNOS 18.1 R3-S8

18.1

Juniper JUNOS 18.1 R3-S9

18.1

Juniper JUNOS 18.2

18.2

Juniper JunOS 18.2 R1

18.2

Juniper JunOS 18.2 R1-S3

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.2R3

18.2

Juniper JUNOS 18.2 R3-S1

18.2

Juniper JUNOS 18.2 R3-S2

18.2

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 R1-S5

18.3

Juniper JUNOS 18.3 R1-S6

18.3

Juniper JUNOS 18.3 R2

18.3

Juniper JUNOS 18.3 R2-S1

18.3

Juniper JUNOS 18.3 R2-S2

18.3

Juniper JUNOS 18.3 R2-S3

18.3

Juniper JUNOS 18.3 R3

18.3

Juniper JUNOS 18.3 R3-S1

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 18.4 R1-S6

18.4

Juniper JUNOS 18.4R2

18.4

Juniper JUNOS 18.4 R2-S1

18.4

Juniper JUNOS 18.4 R2-S2

18.4

Juniper JUNOS 18.4 R2-S3

18.4

Juniper JUNOS 18.4 R3

18.4

Juniper Junos OS 19.1

19.1

Juniper Junos OS 19.1 R1

19.1

Juniper Junos OS 19.1 R1-s1

19.1

Juniper JUNOS 19.1 R1-S2

19.1

Juniper JUNOS 19.1 R1-S3

19.1

Juniper JUNOS 19.1 R1-S4

19.1

Juniper Junos OS 19.1 R2

19.1

Juniper Junos OS 19.2

19.2

Juniper Junos OS 19.2 R1

19.2

Juniper JUNOS 19.2 R1-S1

19.2

Juniper JUNOS 19.2 R1-S2

19.2

Juniper JUNOS 19.2 R1-S3

19.2

Juniper JUNOS 19.3

19.3

Juniper JUNOS 19.3 R1

19.3

Juniper JUNOS 19.3 R1-S1

19.3

Juniper JUNOS 19.3 R2

19.3

Juniper JUNOS 19.3 R2-S1

19.3

Juniper JUNOS 19.3 R2-S2

19.3

Juniper JUNOS 19.4 R1

19.4

Juniper JUNOS 19.4 R1-S1

19.4

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.