Vulnerabilities > CVE-2018-4124 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Apple products

047910
CVSS 9.8 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
network
low complexity
apple
CWE-119
critical
nessus

Summary

An issue was discovered in certain Apple products. iOS before 11.2.6 is affected. macOS before 10.13.3 Supplemental Update is affected. tvOS before 11.2.6 is affected. watchOS before 4.2.3 is affected. The issue involves the "CoreText" component. It allows remote attackers to cause a denial of service (memory corruption and system crash) or possibly have unspecified other impact via a crafted string containing a certain Telugu character.

Vulnerable Configurations

Part Description Count
OS
Apple
392

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 familyMisc.
    NASL idAPPLETV_11_2_6.NASL
    descriptionAccording to its banner, the version of Apple TV on the remote device is prior to 11.2.6. It is, therefore, affected by a memory corruption vulnerability as described in the HT208536 security advisory. Note that only 4th and 5th generation models are affected by these vulnerabilities.
    last seen2020-06-01
    modified2020-06-02
    plugin id106974
    published2018-02-23
    reporterThis script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/106974
    titleApple TV < 11.2.6 Telugu Character Handling Remote Memory Corruption Vulnerability
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(106974);
      script_version("1.6");
      script_cvs_date("Date: 2019/02/26  4:50:08");
    
      script_cve_id("CVE-2018-4124");
      script_bugtraq_id(103066);
      script_xref(name:"APPLE-SA", value:"APPLE-SA-2018-02-19-3");
    
      script_name(english:"Apple TV < 11.2.6 Telugu Character Handling Remote Memory Corruption Vulnerability");
      script_summary(english:"Checks the build number.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Apple TV device is affected by a memory
    corruption vulnerability.");
      script_set_attribute(attribute:"description", value:
    "According to its banner, the version of Apple TV on the remote device
    is prior to 11.2.6. It is, therefore, affected by a memory corruption
    vulnerability as described in the HT208536 security advisory.
    
    Note that only 4th and 5th generation models are affected by these
    vulnerabilities.");
      script_set_attribute(attribute:"see_also", value:"https://support.apple.com/en-us/HT208536");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to Apple TV version 11.2.6 or later. Note that this update is
    only available for 4th and 5th generation models.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/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:"cvss_score_source", value:"CVE-2018-4124");
      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/02/14");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/02/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/02/23");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:apple:apple_tv");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Misc.");
    
      script_copyright(english:"This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("appletv_version.nasl");
      script_require_keys("AppleTV/Version", "AppleTV/Model", "AppleTV/URL", "AppleTV/Port");
      script_require_ports("Services/www", 7000);
    
      exit(0);
    }
    
    include("audit.inc");
    include("appletv_func.inc");
    
    url = get_kb_item('AppleTV/URL');
    if (empty_or_null(url)) exit(0, 'Cannot determine Apple TV URL.');
    port = get_kb_item('AppleTV/Port');
    if (empty_or_null(port)) exit(0, 'Cannot determine Apple TV port.');
    
    build = get_kb_item('AppleTV/Version');
    if (empty_or_null(build)) audit(AUDIT_UNKNOWN_DEVICE_VER, 'Apple TV');
    
    model = get_kb_item('AppleTV/Model');
    if (empty_or_null(model)) exit(0, 'Cannot determine Apple TV model.');
    
    # https://en.wikipedia.org/wiki/TvOS
    # 4th gen model "5,3" and 5th gen model "6,2" share same build
    fixed_build = "15K600";
    tvos_ver = '11';
    
    # determine gen from the model
    gen = APPLETV_MODEL_GEN[model];
    
    appletv_check_version(
      build          : build,
      fix            : fixed_build,
      affected_gen   : make_list(4, 5),
      fix_tvos_ver   : tvos_ver,
      model          : model,
      gen            : gen,
      port           : port,
      url            : url,
      severity       : SECURITY_HOLE
    );
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_10_13_3_SU1.NASL
    descriptionThe remote host is running a version of macOS 10.13.3 that is missing the macOS 10.13.3 Supplemental Update. This update fixes an input- validation flaw, which allows an attacker to cause memory corruption leading to application crashes and potentially to arbitrary code execution.
    last seen2020-06-01
    modified2020-06-02
    plugin id107071
    published2018-02-28
    reporterThis script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/107071
    titlemacOS 10.13.3 Supplemental Update
    code
    #TRUSTED 8b9840216e5107f63e3e617dbece274d27f7b8afd498e672321a2cc138b11977d85cf4f161fc8bf0871fc17779b8b5cfa803d26497a496ed2dcb322a91239af50b6094bcf400e4d69cc826afd5c41f0f64932596a328614215bebe70c2e602ebb593afe156d6331223dc0ae870a85768ae39f39cc0134bde719b6da727a96d1a2c680d57e93dc40fafa2e3e228cea28f03d0ba4ffc541107fd17e985bcea0222aa2ea3141089af76843616d731f61d620a4ce476c0700dbcaa2b710749f3e4674a225321524422158b3a1dd71dabdccb1ed7b92573e69a0e074745cadc08ef0ab62fb84c09b3f6f4228a2b02dd445e9eacea5e72826b89edc0c97133a74cb1300dfb37a334ca1b0041951c42b56e25923f66790c3eca454e27bc3bf65309c8c15a47496ac316627cdef342580d3a459a25779dae7af08a936c1fc4627ca4ebb36ca0a9f1fa170a2ba566de56be151d5be11ec7a7ada9758f9fc2992212b878fb2e752d1491379fd8afa155edc3b1984b85a1058eda9a6e57dacd56b5b14478a13a3cf1dfd1e2c55e2ae674f02880ac97369f331d05fc2d1d158b88483db4f80e8b4f58866e11c5c5ca6f15539f3fd79563682204da7f3a6cda56d4c426c575831a5b747f5721cda35053af2ed08579471332fcc202e895166dab4c2ea1d5e8281c6c49f3012f573f6f76184b8e074bed908aba177cf76c90cd10b302dfc0d54c
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(107071);
      script_version("1.6");
      script_cvs_date("Date: 2019/11/08");
    
      script_cve_id("CVE-2018-4124");
      script_bugtraq_id(103066);
      script_xref(name:"APPLE-SA", value:"APPLE-SA-2018-02-19-2");
    
      script_name(english:"macOS 10.13.3 Supplemental Update");
      script_summary(english:"Check the version of Mac OS X / macOS.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote host is missing a macOS security update that fixes an
    input-validation vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The remote host is running a version of macOS 10.13.3 that is missing
    the macOS 10.13.3 Supplemental Update.  This update fixes an input-
    validation flaw, which allows an attacker to cause memory corruption
    leading to application crashes and potentially to arbitrary code
    execution.");
      script_set_attribute(attribute:"see_also", value:"https://support.apple.com/en-us/HT208535");
      # https://lists.apple.com/archives/security-announce/2018/Feb/msg00001.html
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?866048f5");
      script_set_attribute(attribute:"solution", value:
    "Install the macOS 10.13.3 Supplemental Update.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/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:"cvss_score_source", value:"CVE-2018-4124");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2018/02/19");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/02/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/02/28");
    
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:apple:mac_os_x");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/MacOSX/Version");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("ssh_func.inc");
    include("macosx_func.inc");
    
    
    
    if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
      enable_ssh_wrappers();
    else disable_ssh_wrappers();
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    
    os = get_kb_item("Host/MacOSX/Version");
    if (!os) audit(AUDIT_OS_NOT, "Mac OS X / macOS");
    if (!preg(pattern:"Mac OS X 10\.13\.3([^0-9]|$)", string:os)) audit(AUDIT_OS_NOT, "macOS 10.13.3");
    
    
    # Get the product build version.
    plist = "/System/Library/CoreServices/SystemVersion.plist";
    cmd =
      'plutil -convert xml1 -o - \'' + plist + '\' | ' +
      'grep -A 1 ProductBuildVersion | ' +
      'tail -n 1 | ' +
      'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
    build = exec_cmd(cmd:cmd);
    if (
      !strlen(build) ||
      build !~ "^17D[0-9]+$"
    ) exit(1, "Failed to extract the ProductBuildVersion from '"+plist+"'.");
    
    
    if (build =~ "^17D([0-9]|[0-9][0-9]|10[01])$")
    {
      report = '\n  Product version                 : ' + os +
               '\n  Installed product build version : ' + build +
               '\n  Fixed product build version     : 17D102' +
               '\n';
      security_report_v4(port:0, severity:SECURITY_HOLE, extra:report);
    }
    else exit(0, "The host has product build version "+build+" and is not affected.");