Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386) - Nessus

High   Plugin ID: 101431

This page contains detailed information about the Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 101431
Name: Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386)
Filename: Virtuozzo_VZLSA-2017-0386.nasl
Vulnerability Published: N/A
This Plugin Published: 2017-07-13
Last Modification Time: 2021-01-04
Plugin Version: 1.7
Plugin Type: local
Plugin Family: Virtuozzo Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/local_checks_enabled, Host/Virtuozzo/release, Host/Virtuozzo/rpm-list

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2017-03-06
CVE [?]: CVE-2016-8630, CVE-2016-8655, CVE-2016-9083, CVE-2016-9084
CPE [?]: cpe:/o:virtuozzo:virtuozzo:7, p-cpe:/a:virtuozzo:virtuozzo:kernel, p-cpe:/a:virtuozzo:virtuozzo:kernel-abi-whitelists, p-cpe:/a:virtuozzo:virtuozzo:kernel-debug, p-cpe:/a:virtuozzo:virtuozzo:kernel-debug-devel, p-cpe:/a:virtuozzo:virtuozzo:kernel-devel, p-cpe:/a:virtuozzo:virtuozzo:kernel-doc, p-cpe:/a:virtuozzo:virtuozzo:kernel-headers, p-cpe:/a:virtuozzo:virtuozzo:kernel-tools, p-cpe:/a:virtuozzo:virtuozzo:kernel-tools-libs, p-cpe:/a:virtuozzo:virtuozzo:kernel-tools-libs-devel, p-cpe:/a:virtuozzo:virtuozzo:perf, p-cpe:/a:virtuozzo:virtuozzo:python-perf
Exploited by Malware: True

Synopsis

The remote Virtuozzo host is missing a security update.

Description

An update for kernel is now available for Red Hat Enterprise Linux 7.

Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.

The kernel packages contain the Linux kernel, the core of any Linux operating system.

Security Fix(es) :

* Linux kernel built with the Kernel-based Virtual Machine (CONFIG_KVM) support is vulnerable to a NULL pointer dereference flaw. It could occur on x86 platform, when emulating an undefined instruction. An attacker could use this flaw to crash the host kernel resulting in DoS. (CVE-2016-8630, Important)

* A race condition issue leading to a use-after-free flaw was found in the way the raw packet sockets implementation in the Linux kernel networking subsystem handled synchronization while creating the TPACKET_V3 ring buffer. A local user able to open a raw packet socket (requires the CAP_NET_RAW capability) could use this flaw to elevate their privileges on the system. (CVE-2016-8655, Important)

* A flaw was discovered in the Linux kernel's implementation of VFIO. An attacker issuing an ioctl can create a situation where memory is corrupted and modify memory outside of the expected area. This may overwrite kernel memory and subvert kernel execution. (CVE-2016-9083, Important)

* The use of a kzalloc with an integer multiplication allowed an integer overflow condition to be reached in vfio_pci_intrs.c. This combined with CVE-2016-9083 may allow an attacker to craft an attack and use unallocated memory, potentially crashing the machine. (CVE-2016-9084, Moderate)

Red Hat would like to thank Philip Pettersson for reporting CVE-2016-8655.

Additional Changes :

Space precludes documenting all of the bug fixes and enhancements included in this advisory. To see the complete list of bug fixes and enhancements, refer to the following KnowledgeBase article: https://access.redhat.com/articles/ 2940041.

Note that Tenable Network Security has attempted to extract the preceding description block directly from the corresponding Red Hat security advisory. Virtuozzo provides no description for VZLSA advisories. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Update the affected kernel / kernel-abi-whitelists / kernel-debug / etc package.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386) vulnerability:

  1. Metasploit: exploit/linux/local/af_packet_chocobo_root_priv_esc
    [AF_PACKET chocobo_root Privilege Escalation]
  2. Exploit-DB: exploits/linux/local/44696.rb
    [EDB-44696: Linux 4.4.0 < 4.4.0-53 - 'AF_PACKET chocobo_root' Local Privilege Escalation (Metasploit)]
  3. Exploit-DB: exploits/windows_x86-64/local/47170.c
    [EDB-47170: Linux Kernel 4.4.0-21 < 4.4.0-51 (Ubuntu 14.04/16.04 x64) - 'AF_PACKET' Race Condition Privilege Escalation]
  4. GitHub: https://github.com/KosukeShimofuji/CVE-2016-8655
    [CVE-2016-8655: Linux af_packet.c race condition (local root)]
  5. GitHub: https://github.com/LakshmiDesai/CVE-2016-8655
    [CVE-2016-8655]
  6. GitHub: https://github.com/Metarget/metarget
    [CVE-2016-8655]
  7. GitHub: https://github.com/SeaJae/exploitPlayground
    [CVE-2016-8655]
  8. GitHub: https://github.com/Snoopy-Sec/Localroot-ALL-CVE
    [CVE-2016-8655]
  9. GitHub: https://github.com/Technoashofficial/kernel-exploitation-linux
    [CVE-2016-8655]
  10. GitHub: https://github.com/agkunkle/chocobo
    [CVE-2016-8655: Chocobo Root (CVE-2016-8655) Analysis]
  11. GitHub: https://github.com/anoaghost/Localroot_Compile
    [CVE-2016-8655]
  12. GitHub: https://github.com/bcoles/kernel-exploits
    [CVE-2016-8655]
  13. GitHub: https://github.com/bsauce/kernel-exploit-factory
    [CVE-2016-8655]
  14. GitHub: https://github.com/externalist/exploit_playground
    [CVE-2016-8655]
  15. GitHub: https://github.com/jondonas/linux-exploit-suggester-2
    [CVE-2016-8655]
  16. GitHub: https://github.com/likescam/exploit_playground_lists_androidCVE
    [CVE-2016-8655]
  17. GitHub: https://github.com/mzet-/linux-exploit-suggester
    [CVE-2016-8655]
  18. GitHub: https://github.com/n3t1nv4d3/kernel-exploits
    [CVE-2016-8655]
  19. GitHub: https://github.com/scarvell/cve-2016-8655
    [CVE-2016-8655: PoC for CVE-2016-8655 that causes a kernel panic]
  20. GitHub: https://github.com/skbasava/Linux-Kernel-exploit
    [CVE-2016-8655]
  21. GitHub: https://github.com/xairy/linux-kernel-exploitation
    [CVE-2016-8655]
  22. GitHub: https://github.com/xyongcn/exploit
    [CVE-2016-8655]
  23. GitHub: https://github.com/martinmullins/CVE-2016-8655_Android
    [CVE-2016-8655: Android attempt at PoC CVE-2016-8655]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:L/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:7.2 (High)
Impact Subscore:10.0
Exploitability Subscore:3.9
CVSS Temporal Score:6.3 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.3 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:7.8 (High)
Impact Subscore:5.9
Exploitability Subscore:1.8
CVSS Temporal Score:7.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.5 (High)

Go back to menu.

Plugin Source


This is the Virtuozzo_VZLSA-2017-0386.nasl nessus plugin source code. This script is Copyright (C) 2017-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(101431);
  script_version("1.7");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/04");

  script_cve_id(
    "CVE-2016-8630",
    "CVE-2016-8655",
    "CVE-2016-9083",
    "CVE-2016-9084"
  );

  script_name(english:"Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386)");
  script_summary(english:"Checks the rpm output for the updated package.");

  script_set_attribute(attribute:"synopsis", value:
"The remote Virtuozzo host is missing a security update.");
  script_set_attribute(attribute:"description", value:
"An update for kernel is now available for Red Hat Enterprise Linux 7.

Red Hat Product Security has rated this update as having a security
impact of Important. A Common Vulnerability Scoring System (CVSS) base
score, which gives a detailed severity rating, is available for each
vulnerability from the CVE link(s) in the References section.

The kernel packages contain the Linux kernel, the core of any Linux
operating system.

Security Fix(es) :

* Linux kernel built with the Kernel-based Virtual Machine
(CONFIG_KVM) support is vulnerable to a NULL pointer dereference flaw.
It could occur on x86 platform, when emulating an undefined
instruction. An attacker could use this flaw to crash the host kernel
resulting in DoS. (CVE-2016-8630, Important)

* A race condition issue leading to a use-after-free flaw was found in
the way the raw packet sockets implementation in the Linux kernel
networking subsystem handled synchronization while creating the
TPACKET_V3 ring buffer. A local user able to open a raw packet socket
(requires the CAP_NET_RAW capability) could use this flaw to elevate
their privileges on the system. (CVE-2016-8655, Important)

* A flaw was discovered in the Linux kernel's implementation of VFIO.
An attacker issuing an ioctl can create a situation where memory is
corrupted and modify memory outside of the expected area. This may
overwrite kernel memory and subvert kernel execution. (CVE-2016-9083,
Important)

* The use of a kzalloc with an integer multiplication allowed an
integer overflow condition to be reached in vfio_pci_intrs.c. This
combined with CVE-2016-9083 may allow an attacker to craft an attack
and use unallocated memory, potentially crashing the machine.
(CVE-2016-9084, Moderate)

Red Hat would like to thank Philip Pettersson for reporting
CVE-2016-8655.

Additional Changes :

Space precludes documenting all of the bug fixes and enhancements
included in this advisory. To see the complete list of bug fixes and
enhancements, refer to the following KnowledgeBase article:
https://access.redhat.com/articles/ 2940041.

Note that Tenable Network Security has attempted to extract the
preceding description block directly from the corresponding Red Hat
security advisory. Virtuozzo provides no description for VZLSA
advisories. Tenable has attempted to automatically clean and format
it as much as possible without introducing additional issues.");
  # http://repo.virtuozzo.com/vzlinux/announcements/json/VZLSA-2017-0386.json
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?43a5fb2d");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/errata/RHSA-2017-0386");
  script_set_attribute(attribute:"solution", value:
"Update the affected kernel / kernel-abi-whitelists / kernel-debug / etc package.");
  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:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'AF_PACKET chocobo_root Privilege Escalation');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"patch_publication_date", value:"2017/03/06");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-abi-whitelists");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-debug");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-debug-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-doc");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-headers");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-tools");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-tools-libs");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:kernel-tools-libs-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:perf");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:virtuozzo:virtuozzo:python-perf");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:virtuozzo:virtuozzo:7");
  script_set_attribute(attribute:"plugin_publication_date", value:"2017/07/13");
  script_end_attributes();

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

  script_copyright(english:"This script is Copyright (C) 2017-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/Virtuozzo/release", "Host/Virtuozzo/rpm-list");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("rpm.inc");

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

release = get_kb_item("Host/Virtuozzo/release");
if (isnull(release) || "Virtuozzo" >!< release) audit(AUDIT_OS_NOT, "Virtuozzo");
os_ver = pregmatch(pattern: "Virtuozzo Linux release ([0-9]+\.[0-9])(\D|$)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Virtuozzo");
os_ver = os_ver[1];
if (! preg(pattern:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Virtuozzo 7.x", "Virtuozzo " + os_ver);

if (!get_kb_item("Host/Virtuozzo/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);

cpu = get_kb_item("Host/cpu");
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Virtuozzo", cpu);

flag = 0;

pkgs = ["kernel-3.10.0-514.10.2.vl7",
        "kernel-abi-whitelists-3.10.0-514.10.2.vl7",
        "kernel-debug-3.10.0-514.10.2.vl7",
        "kernel-debug-devel-3.10.0-514.10.2.vl7",
        "kernel-devel-3.10.0-514.10.2.vl7",
        "kernel-doc-3.10.0-514.10.2.vl7",
        "kernel-headers-3.10.0-514.10.2.vl7",
        "kernel-tools-3.10.0-514.10.2.vl7",
        "kernel-tools-libs-3.10.0-514.10.2.vl7",
        "kernel-tools-libs-devel-3.10.0-514.10.2.vl7",
        "perf-3.10.0-514.10.2.vl7",
        "python-perf-3.10.0-514.10.2.vl7"];

foreach (pkg in pkgs)
  if (rpm_check(release:"Virtuozzo-7", reference:pkg)) flag++;

if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "kernel / kernel-abi-whitelists / kernel-debug / etc");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/Virtuozzo_VZLSA-2017-0386.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\Virtuozzo_VZLSA-2017-0386.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/Virtuozzo_VZLSA-2017-0386.nasl

Go back to menu.

How to Run


Here is how to run the Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Virtuozzo Local Security Checks plugin family.
  6. On the right side table select Virtuozzo 7 : kernel / kernel-abi-whitelists / kernel-debug / etc (VZLSA-2017-0386) plugin ID 101431.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl Virtuozzo_VZLSA-2017-0386.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a Virtuozzo_VZLSA-2017-0386.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - Virtuozzo_VZLSA-2017-0386.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state Virtuozzo_VZLSA-2017-0386.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 100664 - Ubuntu 16.04 LTS : linux, linux-aws, linux-gke, linux-raspi2, linux-snapdragon vulnerabilities (USN-3312-1)
  • 100665 - Ubuntu 14.04 LTS : linux-lts-xenial vulnerabilities (USN-3312-2)
  • 101929 - Ubuntu 16.04 LTS : linux-hwe vulnerabilities (USN-3361-1)
  • 102511 - Oracle Linux 7 : kernel (ELSA-2017-1842-1) (Stack Clash)
  • 103326 - Ubuntu 14.04 LTS : linux vulnerabilities (USN-3422-1) (BlueBorne)
  • 111846 - Photon OS 1.0: Dnsmasq / Grub2 / Haproxy / Linux / Nginx / Vim / Wget / Zookeeper PHSA-2016-0012 (deprecated)
  • 111848 - Photon OS 1.0: Linux / Openssh PHSA-2016-0014 (deprecated)
  • 121658 - Photon OS 1.0: Linux PHSA-2016-0014
  • 124806 - EulerOS Virtualization for ARM 64 3.0.1.0 : kernel (EulerOS-SA-2019-1482)
  • 124819 - EulerOS Virtualization 3.0.1.0 : kernel (EulerOS-SA-2019-1496)
  • 124953 - EulerOS Virtualization 3.0.1.0 : kvm (EulerOS-SA-2019-1450)
  • 124971 - EulerOS Virtualization for ARM 64 3.0.1.0 : kernel (EulerOS-SA-2019-1518)
  • 124973 - EulerOS Virtualization for ARM 64 3.0.1.0 : kernel (EulerOS-SA-2019-1520)
  • 124975 - EulerOS Virtualization for ARM 64 3.0.1.0 : kernel (EulerOS-SA-2019-1522)
  • 95566 - Ubuntu 14.04 LTS : linux vulnerability (USN-3149-1)
  • 95567 - Ubuntu 12.04 LTS : linux-lts-trusty vulnerability (USN-3149-2)
  • 95568 - Ubuntu 12.04 LTS : linux vulnerability (USN-3150-1)
  • 95569 - Ubuntu 16.04 LTS : linux vulnerability (USN-3151-1)
  • 95570 - Ubuntu 14.04 LTS : linux-lts-xenial vulnerability (USN-3151-2)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file Virtuozzo_VZLSA-2017-0386.nasl version 1.7. For more plugins, visit the Nessus Plugin Library.

Go back to menu.