Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612) - Nessus

High   Plugin ID: 61326

This page contains detailed information about the Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 61326
Name: Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612)
Filename: sl_20120612_kernel_on_SL5_x.nasl
Vulnerability Published: 2012-06-12
This Plugin Published: 2012-08-01
Last Modification Time: 2021-01-14
Plugin Version: 1.11
Plugin Type: local
Plugin Family: Scientific Linux Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/cpu, Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list

Vulnerability Information


Severity: High
Vulnerability Published: 2012-06-12
Patch Published: 2012-06-12
CVE [?]: CVE-2012-0217, CVE-2012-2934
CPE [?]: p-cpe:/a:fermilab:scientific_linux:kernel, p-cpe:/a:fermilab:scientific_linux:kernel-PAE, p-cpe:/a:fermilab:scientific_linux:kernel-PAE-debuginfo, p-cpe:/a:fermilab:scientific_linux:kernel-PAE-devel, p-cpe:/a:fermilab:scientific_linux:kernel-debug, p-cpe:/a:fermilab:scientific_linux:kernel-debuginfo, p-cpe:/a:fermilab:scientific_linux:kernel-debuginfo-common, p-cpe:/a:fermilab:scientific_linux:kernel-debug-debuginfo, p-cpe:/a:fermilab:scientific_linux:kernel-debug-devel, p-cpe:/a:fermilab:scientific_linux:kernel-devel, p-cpe:/a:fermilab:scientific_linux:kernel-doc, p-cpe:/a:fermilab:scientific_linux:kernel-headers, p-cpe:/a:fermilab:scientific_linux:kernel-xen, p-cpe:/a:fermilab:scientific_linux:kernel-xen-debuginfo, p-cpe:/a:fermilab:scientific_linux:kernel-xen-devel, x-cpe:/o:fermilab:scientific_linux
Exploited by Malware: True

Synopsis

The remote Scientific Linux host is missing one or more security updates.

Description

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

This update fixes the following security issues :

- It was found that the Xen hypervisor implementation as shipped with Scientific Linux 5 did not properly restrict the syscall return addresses in the sysret return path to canonical addresses. An unprivileged user in a 64-bit para-virtualized guest, that is running on a 64-bit host that has an Intel CPU, could use this flaw to crash the host or, potentially, escalate their privileges, allowing them to execute arbitrary code at the hypervisor level. (CVE-2012-0217, Important)

- It was found that guests could trigger a bug in earlier AMD CPUs, leading to a CPU hard lockup, when running on the Xen hypervisor implementation. An unprivileged user in a 64-bit para-virtualized guest could use this flaw to crash the host. Warning: After installing this update, hosts that are using an affected AMD CPU (refer to upstream bug #824966 for a list) will fail to boot. In order to boot such hosts, the new kernel parameter, allow_unsafe, can be used ('allow_unsafe=on'). This option should only be used with hosts that are running trusted guests, as setting it to 'on' reintroduces the flaw (allowing guests to crash the host). (CVE-2012-2934, Moderate)

Note: For Scientific Linux guests, only privileged guest users can exploit the CVE-2012-0217 and CVE-2012-2934 issues.

Users should upgrade to these updated packages, which contain backported patches to correct these issues. The system must be rebooted for this update to take effect.

Solution

Update the affected packages.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612) vulnerability:

  1. Metasploit: exploit/freebsd/local/intel_sysret_priv_esc
    [FreeBSD Intel SYSRET Privilege Escalation]
  2. Exploit-DB: exploits/freebsd_x86-64/local/46508.rb
    [EDB-46508: FreeBSD - Intel SYSRET Privilege Escalation (Metasploit)]
  3. GitHub: https://github.com/Apri1y/Red-Team-links
    [CVE-2012-0217]
  4. GitHub: https://github.com/Ascotbe/Kernelhub
    [CVE-2012-0217]
  5. GitHub: https://github.com/Echocipher/Resource-list
    [CVE-2012-0217]
  6. GitHub: https://github.com/Flerov/WindowsExploitDev
    [CVE-2012-0217]
  7. GitHub: https://github.com/Snoopy-Sec/Localroot-ALL-CVE
    [CVE-2012-0217]
  8. GitHub: https://github.com/anoaghost/Localroot_Compile
    [CVE-2012-0217]
  9. GitHub: https://github.com/cranelab/exploit-development
    [CVE-2012-0217]
  10. GitHub: https://github.com/felixlinker/ifc-rv-thesis
    [CVE-2012-0217]
  11. GitHub: https://github.com/hudunkey/Red-Team-links
    [CVE-2012-0217]
  12. GitHub: https://github.com/john-80/-007
    [CVE-2012-0217]
  13. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2012-0217]
  14. GitHub: https://github.com/slimdaddy/RedTeam
    [CVE-2012-0217]
  15. GitHub: https://github.com/xiaoZ-hc/redtool
    [CVE-2012-0217]
  16. GitHub: https://github.com/ycdxsb/WindowsPrivilegeEscalation
    [CVE-2012-0217]
  17. Immunity Canvas: CANVAS

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
CVSS Base Score:7.2 (High)
Impact Subscore:10.0
Exploitability Subscore:3.9
CVSS Temporal Score:NA (None)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.2 (High)

Go back to menu.

Plugin Source


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

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text is (C) Scientific Linux.
#

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

if (description)
{
  script_id(61326);
  script_version("1.11");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/14");

  script_cve_id("CVE-2012-0217", "CVE-2012-2934");

  script_name(english:"Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612)");
  script_summary(english:"Checks rpm output for the updated packages");

  script_set_attribute(
    attribute:"synopsis", 
    value:
"The remote Scientific Linux host is missing one or more security
updates."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"The kernel packages contain the Linux kernel, the core of any Linux
operating system.

This update fixes the following security issues :

  - It was found that the Xen hypervisor implementation as
    shipped with Scientific Linux 5 did not properly
    restrict the syscall return addresses in the sysret
    return path to canonical addresses. An unprivileged user
    in a 64-bit para-virtualized guest, that is running on a
    64-bit host that has an Intel CPU, could use this flaw
    to crash the host or, potentially, escalate their
    privileges, allowing them to execute arbitrary code at
    the hypervisor level. (CVE-2012-0217, Important)

  - It was found that guests could trigger a bug in earlier
    AMD CPUs, leading to a CPU hard lockup, when running on
    the Xen hypervisor implementation. An unprivileged user
    in a 64-bit para-virtualized guest could use this flaw
    to crash the host. Warning: After installing this
    update, hosts that are using an affected AMD CPU (refer
    to upstream bug #824966 for a list) will fail to boot.
    In order to boot such hosts, the new kernel parameter,
    allow_unsafe, can be used ('allow_unsafe=on'). This
    option should only be used with hosts that are running
    trusted guests, as setting it to 'on' reintroduces the
    flaw (allowing guests to crash the host).
    (CVE-2012-2934, Moderate)

Note: For Scientific Linux guests, only privileged guest users can
exploit the CVE-2012-0217 and CVE-2012-2934 issues.

Users should upgrade to these updated packages, which contain
backported patches to correct these issues. The system must be
rebooted for this update to take effect."
  );
  # https://listserv.fnal.gov/scripts/wa.exe?A2=ind1206&L=scientific-linux-errata&T=0&P=1832
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.nessus.org/u?a489a838"
  );
  script_set_attribute(attribute:"solution", value:"Update the affected packages.");
  script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A: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:'FreeBSD Intel SYSRET Privilege Escalation');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-PAE");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-PAE-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-PAE-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-debug");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-debug-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-debug-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-debuginfo-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-doc");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-headers");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-xen");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-xen-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:kernel-xen-devel");
  script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux");

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/06/12");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/06/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/08/01");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2012-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"Scientific Linux Local Security Checks");

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

  exit(0);
}


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

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
release = get_kb_item("Host/RedHat/release");
if (isnull(release) || "Scientific Linux " >!< release) audit(AUDIT_HOST_NOT, "running Scientific Linux");
os_ver = pregmatch(pattern: "Scientific Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Scientific Linux");
os_ver = os_ver[1];
if (! preg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Scientific Linux 5.x", "Scientific Linux " + os_ver);
if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);

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


flag = 0;
if (rpm_check(release:"SL5", reference:"kernel-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", cpu:"i386", reference:"kernel-PAE-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", cpu:"i386", reference:"kernel-PAE-debuginfo-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", cpu:"i386", reference:"kernel-PAE-devel-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-debug-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-debug-debuginfo-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-debug-devel-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-debuginfo-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-debuginfo-common-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-devel-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-doc-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-headers-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-xen-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-xen-debuginfo-2.6.18-308.8.2.el5")) flag++;
if (rpm_check(release:"SL5", reference:"kernel-xen-devel-2.6.18-308.8.2.el5")) 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-PAE / kernel-PAE-debuginfo / kernel-PAE-devel / etc");
}

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

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

Go back to menu.

How to Run


Here is how to run the Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612) 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 Scientific Linux Local Security Checks plugin family.
  6. On the right side table select Scientific Linux Security Update : kernel on SL5.x i386/x86_64 (20120612) plugin ID 61326.
  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 sl_20120612_kernel_on_SL5_x.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a sl_20120612_kernel_on_SL5_x.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - sl_20120612_kernel_on_SL5_x.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 sl_20120612_kernel_on_SL5_x.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 59479 - CentOS 5 : kernel (CESA-2012:0721)
  • 59779 - Debian DSA-2501-1 : xen - several vulnerabilities
  • 60088 - Debian DSA-2508-1 : kfreebsd-8 - privilege escalation
  • 59748 - FreeBSD : FreeBSD -- Privilege escalation when returning from kernel (aed44c4e-c067-11e1-b5e0-000c299b62e1)
  • 70184 - GLSA-201309-24 : Xen: Multiple vulnerabilities
  • 74682 - openSUSE Security Update : xen (openSUSE-SU-2012:0886-1)
  • 74683 - openSUSE Security Update : xen (openSUSE-2012-404)
  • 68539 - Oracle Linux 5 : kernel (ELSA-2012-0721-1)
  • 68540 - Oracle Linux 5 : kernel (ELSA-2012-0721)
  • 79476 - OracleVM 3.0 : xen (OVMSA-2012-0020)
  • 79477 - OracleVM 3.1 : xen (OVMSA-2012-0021)
  • 79478 - OracleVM 2.2 : xen (OVMSA-2012-0022)
  • 84140 - OracleVM 3.2 : xen (OVMSA-2015-0068) (POODLE) (Venom)
  • 64039 - RHEL 5 : kernel (RHSA-2012:0720)
  • 59467 - RHEL 5 : kernel (RHSA-2012:0721)
  • 59460 - MS12-042: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2711167)
  • 76829 - Oracle Solaris Critical Patch Update : oct2012_SRU10_5
  • 64233 - SuSE 11.1 Security Update : Xen (SAT Patch Number 6399)
  • 59469 - SuSE 10 Security Update : Xen (ZYPP Patch Number 8180)

Version


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

Go back to menu.