Slackware 12.2 / current : kernel (SSA:2009-230-01) - Nessus

High   Plugin ID: 40622

This page contains detailed information about the Slackware 12.2 / current : kernel (SSA:2009-230-01) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 40622
Name: Slackware 12.2 / current : kernel (SSA:2009-230-01)
Filename: Slackware_SSA_2009-230-01.nasl
Vulnerability Published: N/A
This Plugin Published: 2009-08-20
Last Modification Time: 2021-01-14
Plugin Version: 1.17
Plugin Type: local
Plugin Family: Slackware Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/local_checks_enabled, Host/Slackware/packages, Host/Slackware/release

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2009-08-18
CVE [?]: CVE-2009-2692
CPE [?]: cpe:/o:slackware:slackware_linux, cpe:/o:slackware:slackware_linux:12.2, p-cpe:/a:slackware:slackware_linux:kernel-firmware, p-cpe:/a:slackware:slackware_linux:kernel-generic, p-cpe:/a:slackware:slackware_linux:kernel-generic-smp, p-cpe:/a:slackware:slackware_linux:kernel-headers, p-cpe:/a:slackware:slackware_linux:kernel-huge, p-cpe:/a:slackware:slackware_linux:kernel-huge-smp, p-cpe:/a:slackware:slackware_linux:kernel-modules, p-cpe:/a:slackware:slackware_linux:kernel-modules-smp, p-cpe:/a:slackware:slackware_linux:kernel-source
Exploited by Malware: True

Synopsis

The remote Slackware host is missing a security update.

Description

New Linux kernel packages are available for Slackware 12.2 and -current to address a security issue. A kernel bug discovered by Tavis Ormandy and Julien Tinnes of the Google Security Team could allow a local user to fill memory page zero with arbitrary code and then use the kernel sendpage operation to trigger a NULL pointer dereference, executing the code in the context of the kernel. If successfully exploited, this bug can be used to gain root access. At this time we have prepared fixed kernels for the stable version of Slackware (12.2), as well as for both 32-bit x86 and x86_64 -current versions. Additionally, we have added a package to the /patches directory for Slackware 12.1 and 12.2 that will set the minimum memory page that can be mmap()ed from userspace without additional privileges to 4096. The package will work with any kernel supporting the vm.mmap_min_addr tunable, and should significantly reduce the potential harm from this bug, as well as future similar bugs that might be found in the kernel. More updated kernels may follow.

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 Slackware 12.2 / current : kernel (SSA:2009-230-01) vulnerability:

  1. Metasploit: exploit/linux/local/sock_sendpage
    [Linux Kernel Sendpage Local Privilege Escalation]
  2. Exploit-DB: exploits/android/local/9477.txt
    [EDB-9477: Linux Kernel 2.x (Android) - 'sock_sendpage()' Local Privilege Escalation]
  3. Exploit-DB: exploits/linux/local/9479.c
    [EDB-9479: Linux Kernel 2.4/2.6 (RedHat Linux 9 / Fedora Core 4 < 11 / Whitebox 4 / CentOS 4) - 'sock_sendpage()' Ring0 Privilege Escalation (5)]
  4. Exploit-DB: exploits/linux/local/19933.rb
    [EDB-19933: Linux Kernel 2.4.4 < 2.4.37.4 / 2.6.0 < 2.6.30.4 - 'Sendpage' Local Privilege Escalation (Metasploit)]
  5. GitHub: https://github.com/Al1ex/LinuxEelvation
    [CVE-2009-2692]
  6. GitHub: https://github.com/De4dCr0w/Linux-kernel-EoP-exp
    [CVE-2009-2692]
  7. GitHub: https://github.com/InteliSecureLabs/Linux_Exploit_Suggester
    [CVE-2009-2692]
  8. GitHub: https://github.com/PleXone2019/Linux_Exploit_Suggester
    [CVE-2009-2692]
  9. GitHub: https://github.com/R0B1NL1N/Linux-Kernal-Exploits-m-
    [CVE-2009-2692]
  10. GitHub: https://github.com/R0B1NL1N/Linux-Kernel-Exploites
    [CVE-2009-2692]
  11. GitHub: https://github.com/Snoopy-Sec/Localroot-ALL-CVE
    [CVE-2009-2692]
  12. GitHub: https://github.com/Technoashofficial/kernel-exploitation-linux
    [CVE-2009-2692]
  13. GitHub: https://github.com/cloudsec/exploit
    [CVE-2009-2692]
  14. GitHub: https://github.com/h4x0r-dz/local-root-exploit-
    [CVE-2009-2692]
  15. GitHub: https://github.com/moshekaplan/pentesting_notes
    [CVE-2009-2692]
  16. GitHub: https://github.com/packetforger/localroot
    [CVE-2009-2692]
  17. GitHub: https://github.com/qashqao/linux-xsuggest
    [CVE-2009-2692]
  18. GitHub: https://github.com/qiantu88/Linux--exp
    [CVE-2009-2692]
  19. GitHub: https://github.com/rakjong/LinuxElevation
    [CVE-2009-2692]
  20. GitHub: https://github.com/ram4u/Linux_Exploit_Suggester
    [CVE-2009-2692]
  21. GitHub: https://github.com/skbasava/Linux-Kernel-exploit
    [CVE-2009-2692]
  22. GitHub: https://github.com/tangsilian/android-vuln
    [CVE-2009-2692]
  23. GitHub: https://github.com/taviso/iknowthis
    [CVE-2009-2692]
  24. GitHub: https://github.com/xairy/linux-kernel-exploitation
    [CVE-2009-2692]
  25. GitHub: https://github.com/offensive-security/exploitdb-bin-sploits/blob/master/bin-sploits/9477.tar.gz
    [EDB-9477]
  26. GitHub: https://github.com/jdvalentini/CVE-2009-2692
    [CVE-2009-2692: Linux Null pointer dereference]
  27. 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 Slackware_SSA_2009-230-01.nasl nessus plugin source code. This script is Copyright (C) 2009-2021 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Slackware Security Advisory 2009-230-01. The text 
# itself is copyright (C) Slackware Linux, Inc.
#

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

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

  script_cve_id("CVE-2009-2692");
  script_xref(name:"SSA", value:"2009-230-01");

  script_name(english:"Slackware 12.2 / current : kernel (SSA:2009-230-01)");
  script_summary(english:"Checks for updated packages in /var/log/packages");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote Slackware host is missing a security update."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"New Linux kernel packages are available for Slackware 12.2 and
-current to address a security issue. A kernel bug discovered by Tavis
Ormandy and Julien Tinnes of the Google Security Team could allow a
local user to fill memory page zero with arbitrary code and then use
the kernel sendpage operation to trigger a NULL pointer dereference,
executing the code in the context of the kernel. If successfully
exploited, this bug can be used to gain root access. At this time we
have prepared fixed kernels for the stable version of Slackware
(12.2), as well as for both 32-bit x86 and x86_64 -current versions.
Additionally, we have added a package to the /patches directory for
Slackware 12.1 and 12.2 that will set the minimum memory page that can
be mmap()ed from userspace without additional privileges to 4096. The
package will work with any kernel supporting the vm.mmap_min_addr
tunable, and should significantly reduce the potential harm from this
bug, as well as future similar bugs that might be found in the kernel.
More updated kernels may follow."
  );
  # http://www.slackware.com/security/viewer.php?l=slackware-security&y=2009&m=slackware-security.877234
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.nessus.org/u?f87ae2f9"
  );
  # http://www.slackware.com/security/viewer.php?l=slackware-security&y=2009&m=slackware-security.449266
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.nessus.org/u?6bdb98d3"
  );
  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:'Linux Kernel Sendpage Local 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_cwe_id(119);

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-firmware");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-generic");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-generic-smp");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-headers");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-huge");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-huge-smp");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-modules");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-modules-smp");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:kernel-source");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux:12.2");

  script_set_attribute(attribute:"patch_publication_date", value:"2009/08/18");
  script_set_attribute(attribute:"plugin_publication_date", value:"2009/08/20");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2009-2021 Tenable Network Security, Inc.");
  script_family(english:"Slackware Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/Slackware/release", "Host/Slackware/packages");

  exit(0);
}


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


if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
if (!get_kb_item("Host/Slackware/release")) audit(AUDIT_OS_NOT, "Slackware");
if (!get_kb_item("Host/Slackware/packages")) 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, "Slackware", cpu);


flag = 0;
if (slackware_check(osver:"12.2", pkgname:"kernel-firmware", pkgver:"2.6.27.31", pkgarch:"noarch", pkgnum:"1")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-generic", pkgver:"2.6.27.31", pkgarch:"i486", pkgnum:"1")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-generic-smp", pkgver:"2.6.27.31_smp", pkgarch:"i686", pkgnum:"2")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-headers", pkgver:"2.6.27.31_smp", pkgarch:"x86", pkgnum:"1")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-huge", pkgver:"2.6.27.31", pkgarch:"i486", pkgnum:"1")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-huge-smp", pkgver:"2.6.27.31_smp", pkgarch:"i686", pkgnum:"1")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-modules", pkgver:"2.6.27.31", pkgarch:"i486", pkgnum:"1")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-modules-smp", pkgver:"2.6.27.31_smp", pkgarch:"i686", pkgnum:"2")) flag++;
if (slackware_check(osver:"12.2", pkgname:"kernel-source", pkgver:"2.6.27.31_smp", pkgarch:"noarch", pkgnum:"2")) flag++;

if (slackware_check(osver:"current", pkgname:"kernel-firmware", pkgver:"2.6.29.6", pkgarch:"noarch", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-generic", pkgver:"2.6.29.6", pkgarch:"i486", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-generic-smp", pkgver:"2.6.29.6_smp", pkgarch:"i686", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-headers", pkgver:"2.6.29.6_smp", pkgarch:"x86", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-huge", pkgver:"2.6.29.6", pkgarch:"i486", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-huge-smp", pkgver:"2.6.29.6_smp", pkgarch:"i686", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-modules", pkgver:"2.6.29.6", pkgarch:"i486", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-modules-smp", pkgver:"2.6.29.6_smp", pkgarch:"i686", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", pkgname:"kernel-source", pkgver:"2.6.29.6_smp", pkgarch:"noarch", pkgnum:"1")) flag++;
if (slackware_check(osver:"current", arch:"x86_64", pkgname:"kernel-firmware", pkgver:"2.6.29.6", pkgarch:"noarch", pkgnum:"2")) flag++;
if (slackware_check(osver:"current", arch:"x86_64", pkgname:"kernel-generic", pkgver:"2.6.29.6", pkgarch:"x86_64", pkgnum:"2")) flag++;
if (slackware_check(osver:"current", arch:"x86_64", pkgname:"kernel-headers", pkgver:"2.6.29.6", pkgarch:"x86", pkgnum:"2")) flag++;
if (slackware_check(osver:"current", arch:"x86_64", pkgname:"kernel-huge", pkgver:"2.6.29.6", pkgarch:"x86_64", pkgnum:"2")) flag++;
if (slackware_check(osver:"current", arch:"x86_64", pkgname:"kernel-modules", pkgver:"2.6.29.6", pkgarch:"x86_64", pkgnum:"2")) flag++;
if (slackware_check(osver:"current", arch:"x86_64", pkgname:"kernel-source", pkgver:"2.6.29.6", pkgarch:"noarch", pkgnum:"2")) flag++;


if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:slackware_report_get());
  else security_hole(0);
  exit(0);
}
else audit(AUDIT_HOST_NOT, "affected");

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

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

Go back to menu.

How to Run


Here is how to run the Slackware 12.2 / current : kernel (SSA:2009-230-01) 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 Slackware Local Security Checks plugin family.
  6. On the right side table select Slackware 12.2 / current : kernel (SSA:2009-230-01) plugin ID 40622.
  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 Slackware_SSA_2009-230-01.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a Slackware_SSA_2009-230-01.nasl -t <IP/HOST>

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

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

Go back to menu.

References


SSA | Slackware Security Advisory: CWE | Common Weakness Enumeration:
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 43777 - CentOS 5 : kernel (CESA-2009:1222)
  • 40753 - CentOS 4 : kernel (CESA-2009:1223)
  • 40808 - CentOS 3 : kernel (CESA-2009:1233)
  • 44727 - Debian DSA-1862-1 : linux-2.6 - privilege escalation
  • 44729 - Debian DSA-1864-1 : linux-2.6.24 - privilege escalation
  • 44730 - Debian DSA-1865-1 : linux-2.6 - denial of service/privilege escalation
  • 40605 - Fedora 10 : kernel-2.6.27.29-170.2.79.fc10 (2009-8647)
  • 40606 - Fedora 11 : kernel-2.6.29.6-217.2.7.fc11 (2009-8649)
  • 40637 - Mandriva Linux Security Advisory : kernel (MDVSA-2009:205)
  • 40980 - Mandriva Linux Security Advisory : kernel (MDVSA-2009:233)
  • 67914 - Oracle Linux 5 : kernel (ELSA-2009-1222)
  • 67915 - Oracle Linux 4 : kernel (ELSA-2009-1223)
  • 67917 - Oracle Linux 3 : kernel (ELSA-2009-1233)
  • 79465 - OracleVM 2.1 : kernel (OVMSA-2009-0023)
  • 79507 - OracleVM 2.2 : kernel (OVMSA-2013-0039)
  • 40765 - RHEL 5 : kernel (RHSA-2009:1222)
  • 40766 - RHEL 4 : kernel (RHSA-2009:1223)
  • 40795 - RHEL 3 : kernel (RHSA-2009:1233)
  • 63896 - RHEL 5 : kernel (RHSA-2009:1457)
  • 63899 - RHEL 4 : kernel (RHSA-2009:1469)
  • 60646 - Scientific Linux Security Update : kernel on SL5.x i386/x86_64
  • 60648 - Scientific Linux Security Update : kernel on SL3.x i386/x86_64
  • 40783 - openSUSE Security Update : kernel (kernel-1211)
  • 40789 - openSUSE Security Update : kernel (kernel-1214)
  • 41414 - SuSE 11 Security Update : Linux kernel (SAT Patch Numbers 1212 / 1218 / 1219)
  • 59138 - SuSE 10 Security Update : Linux kernel (ZYPP Patch Number 6437)
  • 41540 - SuSE 10 Security Update : Linux kernel (ZYPP Patch Number 6439)
  • 42009 - openSUSE 10 Security Update : kernel (kernel-6440)
  • 40658 - Ubuntu 6.06 LTS / 8.04 LTS / 8.10 / 9.04 : linux, linux-source-2.6.15 vulnerability (USN-819-1)
  • 42870 - VMSA-2009-0016 : VMware vCenter and ESX update release and vMA patch release address multiple security issues in third party components.
  • 89117 - VMware ESX / ESXi Multiple Vulnerabilities (VMSA-2009-0016) (remote check)
  • 47150 - VMSA-2010-0010 : ESX 3.5 third-party update for Service Console kernel

Version


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

Go back to menu.