Vulnerabilities > CVE-2018-0007 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Juniper Junos

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
juniper
CWE-119
critical
nessus

Summary

An unauthenticated network-based attacker able to send a maliciously crafted LLDP packet to the local segment, through a local segment broadcast, may be able to cause a Junos device to enter an improper boundary check condition allowing a memory corruption to occur, leading to a denial of service. Further crafted packets may be able to sustain the denial of service condition. Score: 6.5 MEDIUM (CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) Further, if the attacker is authenticated on the target device receiving and processing the malicious LLDP packet, while receiving the crafted packets, the attacker may be able to perform command or arbitrary code injection over the target device thereby elevating their permissions and privileges, and taking control of the device. Score: 7.8 HIGH (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) An unauthenticated network-based attacker able to send a maliciously crafted LLDP packet to one or more local segments, via LLDP proxy / tunneling agents or other LLDP through Layer 3 deployments, through one or more local segment broadcasts, may be able to cause multiple Junos devices to enter an improper boundary check condition allowing a memory corruption to occur, leading to multiple distributed Denials of Services. These Denials of Services attacks may have cascading Denials of Services to adjacent connected devices, impacts network devices, servers, workstations, etc. Further crafted packets may be able to sustain these Denials of Services conditions. Score 6.8 MEDIUM (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H) Further, if the attacker is authenticated on one or more target devices receiving and processing these malicious LLDP packets, while receiving the crafted packets, the attacker may be able to perform command or arbitrary code injection over multiple target devices thereby elevating their permissions and privileges, and taking control multiple devices. Score: 7.8 HIGH (CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H) Affected releases are Juniper Networks Junos OS: 12.1X46 versions prior to 12.1X46-D71; 12.3 versions prior to 12.3R12-S7; 12.3X48 versions prior to 12.3X48-D55; 14.1 versions prior to 14.1R8-S5, 14.1R9; 14.1X53 versions prior to 14.1X53-D46, 14.1X53-D50, 14.1X53-D107; 14.2 versions prior to 14.2R7-S9, 14.2R8; 15.1 versions prior to 15.1F2-S17, 15.1F5-S8, 15.1F6-S8, 15.1R5-S7, 15.1R7; 15.1X49 versions prior to 15.1X49-D90; 15.1X53 versions prior to 15.1X53-D65; 16.1 versions prior to 16.1R4-S6, 16.1R5; 16.1X65 versions prior to 16.1X65-D45; 16.2 versions prior to 16.2R2; 17.1 versions prior to 17.1R2. No other Juniper Networks products or platforms are affected by this issue.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

NASL familyJunos Local Security Checks
NASL idJUNIPER_JSA10830.NASL
descriptionAccording to its self-reported version number, the remote Junos device is affected by a vulnerability that results in a denial of service or potentially execution of arbitrary code.
last seen2020-06-01
modified2020-06-02
plugin id106387
published2018-01-26
reporterThis script is Copyright (C) 2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/106387
titleJuniper Junos LLDP Packet Handling Memory Corruption Vulnerability (JSA10830)
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(106387);
  script_version("1.4");
  script_cvs_date("Date: 2018/07/12 19:01:16");

  script_cve_id("CVE-2018-0007");
  script_xref(name:"JSA", value:"JSA10830");

  script_name(english:"Juniper Junos LLDP Packet Handling Memory Corruption Vulnerability (JSA10830)");
  script_summary(english:"Checks the Junos version and build date.");

  script_set_attribute(attribute:"synopsis", value:
"The remote device is missing a vendor-supplied security patch.");
  script_set_attribute(attribute:"description", value:
"According to its self-reported version number, the remote Junos device
is affected by a vulnerability that results in a denial of service or
potentially execution of arbitrary code.");
  # https://kb.juniper.net/InfoCenter/index?page=content&id=JSA10830&actp=METADATA
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a46a97e7");
  script_set_attribute(attribute:"solution", value:
"Apply the relevant Junos software release referenced in
Juniper advisory JSA10830.");
  script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/01/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2018/01/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2018/01/26");

  script_set_attribute(attribute:"plugin_type", value:"combined");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:juniper:junos");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Junos Local Security Checks");

  script_copyright(english:"This script is Copyright (C) 2018 Tenable Network Security, Inc.");

  script_dependencies("junos_version.nasl");
  script_require_keys("Host/Juniper/JUNOS/Version", "Host/Juniper/model");

  exit(0);
}

include("audit.inc");
include("junos_kb_cmd_func.inc");

ver = get_kb_item_or_exit('Host/Juniper/JUNOS/Version');
model = get_kb_item_or_exit('Host/Juniper/model');

# Affected:
# 12.1X46 versions prior to 12.1X46-D71
# 12.3 versions prior to 12.3R12-S7
# 12.3X48 versions prior to 12.3X48-D55
# 14.1 versions prior to 14.1R8-S5, 14.1R9
# 14.1X53 versions prior to 14.1X53-D46, 14.1X53-D107
# 14.2 versions prior to 14.2R7-S9, 14.2R8
# 15.1 versions prior to 15.1F2-S17, 15.1F5-S8, 15.1F6-S8, 15.1R5-S7, 15.1R7
# 15.1X49 versions prior to 15.1X49-D90
# 15.1X53 versions prior to 15.1X53-D65
# 16.1 versions prior to 16.1R4-S6, 16.1R5
# 16.1X65 versions prior to 16.1X65-D45
# 16.2 versions prior to 16.2R2
# 17.1 versions prior to 17.1R2
fixes = make_array();
fixes['12.1X46'] = '12.1X46-D71';
fixes['12.3'] = '12.3R12-S7';
fixes['12.3X48'] = '12.3X48-D55';
if (ver =~ "^14\.1R8")
  fixes['14.1'] = '14.1R8-S5';
else
  fixes['14.1'] = '14.1R9';
fixes['14.1X53'] = '14.1X53-D46'; # or 14.1X53-D107
if (ver =~ "^14\.2R7")
  fixes['14.2'] = '14.2R7-S9';
else
  fixes['14.2'] = '14.2R8';
if (ver =~ "^15\.1F2")
  fixes['15.1'] = '15.1F2-S17';
else if (ver =~ "^15\.1F5")
  fixes['15.1'] = '15.1F5-S8';
else if (ver =~ "^15\.1F6")
  fixes['15.1'] = '15.1F6-S8';
else if (ver =~ "^15\.1R5")
  fixes['15.1'] = '15.1R5-S7';
else
  fixes['15.1'] = '15.1R7';
fixes['15.1X49'] = '15.1X49-D90';
fixes['15.1X53'] = '15.1X53-D65';
if (ver =~ "^16\.1R4")
  fixes['16.1'] = '16.1R4-S6';
else
  fixes['16.1'] = '16.1R5';
fixes['16.1X65'] = '16.1X65-D45';
fixes['16.2'] = '16.2R2';
fixes['17.1'] = '17.1R2';

fix = check_junos(ver:ver, fixes:fixes, exit_on_fail:TRUE);

override = FALSE;

junos_report(ver:ver, fix:fix, override:override, severity:SECURITY_HOLE);