Vulnerabilities > CVE-2012-0870 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in multiple products

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

Heap-based buffer overflow in process.c in smbd in Samba 3.0, as used in the file-sharing service on the BlackBerry PlayBook tablet before 2.0.0.7971 and other products, allows remote attackers to cause a denial of service (daemon crash) or possibly execute arbitrary code via a Batched (aka AndX) request that triggers infinite recursion.

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 familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2012-0332.NASL
    descriptionUpdated samba packages that fix one security issue are now available for Red Hat Enterprise Linux 4 and 5, and Red Hat Enterprise Linux 5.3 Long Life, and 5.6 Extended Update Support. The Red Hat Security Response Team has rated this update as having critical security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. Samba is a suite of programs used by machines to share files, printers, and other information. An input validation flaw was found in the way Samba handled Any Batched (AndX) requests. A remote, unauthenticated attacker could send a specially crafted SMB packet to the Samba server, possibly resulting in arbitrary code execution with the privileges of the Samba server (root). (CVE-2012-0870) Red Hat would like to thank the Samba team for reporting this issue. Upstream acknowledges Andy Davis of NGS Secure as the original reporter. Users of Samba are advised to upgrade to these updated packages, which contain a backported patch to resolve this issue. After installing this update, the smb service will be restarted automatically.
    last seen2020-04-16
    modified2012-02-24
    plugin id58111
    published2012-02-24
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/58111
    titleRHEL 4 / 5 : samba (RHSA-2012:0332)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2012:0332. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(58111);
      script_version ("1.20");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/15");
    
      script_cve_id("CVE-2012-0870");
      script_bugtraq_id(52103);
      script_xref(name:"RHSA", value:"2012:0332");
    
      script_name(english:"RHEL 4 / 5 : samba (RHSA-2012:0332)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated samba packages that fix one security issue are now available
    for Red Hat Enterprise Linux 4 and 5, and Red Hat Enterprise Linux 5.3
    Long Life, and 5.6 Extended Update Support.
    
    The Red Hat Security Response Team has rated this update as having
    critical security impact. A Common Vulnerability Scoring System (CVSS)
    base score, which gives a detailed severity rating, is available from
    the CVE link in the References section.
    
    Samba is a suite of programs used by machines to share files,
    printers, and other information.
    
    An input validation flaw was found in the way Samba handled Any
    Batched (AndX) requests. A remote, unauthenticated attacker could send
    a specially crafted SMB packet to the Samba server, possibly resulting
    in arbitrary code execution with the privileges of the Samba server
    (root). (CVE-2012-0870)
    
    Red Hat would like to thank the Samba team for reporting this issue.
    Upstream acknowledges Andy Davis of NGS Secure as the original
    reporter.
    
    Users of Samba are advised to upgrade to these updated packages, which
    contain a backported patch to resolve this issue. After installing
    this update, the smb service will be restarted automatically."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2012:0332"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2012-0870"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:libsmbclient");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:libsmbclient-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-swat");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5.3");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5.6");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/02/24");
      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-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      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) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(4|5)([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 4.x / 5.x", "Red Hat " + 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 ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2012:0332";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_HOLE,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {  sp = get_kb_item("Host/RedHat/minor_release");
      if (isnull(sp)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    
      flag = 0;
      if (rpm_check(release:"RHEL4", reference:"samba-3.0.33-0.35.el4")) flag++;
    
      if (rpm_check(release:"RHEL4", reference:"samba-client-3.0.33-0.35.el4")) flag++;
    
      if (rpm_check(release:"RHEL4", reference:"samba-common-3.0.33-0.35.el4")) flag++;
    
      if (rpm_check(release:"RHEL4", reference:"samba-swat-3.0.33-0.35.el4")) flag++;
    
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", reference:"libsmbclient-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", reference:"libsmbclient-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", reference:"libsmbclient-devel-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", reference:"libsmbclient-devel-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"i386", reference:"samba-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"i386", reference:"samba-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"s390x", reference:"samba-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"samba-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"x86_64", reference:"samba-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"samba-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"i386", reference:"samba-client-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"i386", reference:"samba-client-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"s390x", reference:"samba-client-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"samba-client-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"x86_64", reference:"samba-client-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"samba-client-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", reference:"samba-common-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", reference:"samba-common-3.0.33-3.38.el5_8")) flag++; }
    
      if (rpm_check(release:"RHEL5", reference:"samba-debuginfo-3.0.33-3.38.el5_8")) flag++;
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"i386", reference:"samba-swat-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"i386", reference:"samba-swat-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"s390x", reference:"samba-swat-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"samba-swat-3.0.33-3.38.el5_8")) flag++; }
    
    if (sp == "6") {   if (rpm_check(release:"RHEL5", sp:"6", cpu:"x86_64", reference:"samba-swat-3.0.33-3.29.el5_6.4")) flag++; }
      else { if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"samba-swat-3.0.33-3.38.el5_8")) flag++; }
    
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_HOLE,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libsmbclient / libsmbclient-devel / samba / samba-client / etc");
      }
    }
    
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2012-0332.NASL
    descriptionUpdated samba packages that fix one security issue are now available for Red Hat Enterprise Linux 4 and 5, and Red Hat Enterprise Linux 5.3 Long Life, and 5.6 Extended Update Support. The Red Hat Security Response Team has rated this update as having critical security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. Samba is a suite of programs used by machines to share files, printers, and other information. An input validation flaw was found in the way Samba handled Any Batched (AndX) requests. A remote, unauthenticated attacker could send a specially crafted SMB packet to the Samba server, possibly resulting in arbitrary code execution with the privileges of the Samba server (root). (CVE-2012-0870) Red Hat would like to thank the Samba team for reporting this issue. Upstream acknowledges Andy Davis of NGS Secure as the original reporter. Users of Samba are advised to upgrade to these updated packages, which contain a backported patch to resolve this issue. After installing this update, the smb service will be restarted automatically.
    last seen2020-06-01
    modified2020-06-02
    plugin id58109
    published2012-02-24
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/58109
    titleCentOS 4 : samba (CESA-2012:0332)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2012:0332 and 
    # CentOS Errata and Security Advisory 2012:0332 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(58109);
      script_version("1.10");
      script_cvs_date("Date: 2020/01/07");
    
      script_cve_id("CVE-2012-0870");
      script_bugtraq_id(52103);
      script_xref(name:"RHSA", value:"2012:0332");
    
      script_name(english:"CentOS 4 : samba (CESA-2012:0332)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated samba packages that fix one security issue are now available
    for Red Hat Enterprise Linux 4 and 5, and Red Hat Enterprise Linux 5.3
    Long Life, and 5.6 Extended Update Support.
    
    The Red Hat Security Response Team has rated this update as having
    critical security impact. A Common Vulnerability Scoring System (CVSS)
    base score, which gives a detailed severity rating, is available from
    the CVE link in the References section.
    
    Samba is a suite of programs used by machines to share files,
    printers, and other information.
    
    An input validation flaw was found in the way Samba handled Any
    Batched (AndX) requests. A remote, unauthenticated attacker could send
    a specially crafted SMB packet to the Samba server, possibly resulting
    in arbitrary code execution with the privileges of the Samba server
    (root). (CVE-2012-0870)
    
    Red Hat would like to thank the Samba team for reporting this issue.
    Upstream acknowledges Andy Davis of NGS Secure as the original
    reporter.
    
    Users of Samba are advised to upgrade to these updated packages, which
    contain a backported patch to resolve this issue. After installing
    this update, the smb service will be restarted automatically."
      );
      # https://lists.centos.org/pipermail/centos-announce/2012-February/018454.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?c067e9c7"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected samba packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2012-0870");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:samba-swat");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:4");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/02/24");
      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-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/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/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^4([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 4.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && "ia64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-4", cpu:"i386", reference:"samba-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"x86_64", reference:"samba-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"i386", reference:"samba-client-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"x86_64", reference:"samba-client-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"i386", reference:"samba-common-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"x86_64", reference:"samba-common-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"i386", reference:"samba-swat-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"x86_64", reference:"samba-swat-3.0.33-0.35.el4")) 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, "samba / samba-client / samba-common / samba-swat");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2012-223.NASL
    description - Add the ldapsmb sources as else patches against them have no chance to apply. - Samba pre-3.6.4 are affected by a vulnerability that allows remote code exe- cution as the
    last seen2020-06-05
    modified2014-06-13
    plugin id74600
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/74600
    titleopenSUSE Security Update : samba (openSUSE-SU-2012:0507-1)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update openSUSE-2012-223.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(74600);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2012-0870", "CVE-2012-1182");
    
      script_name(english:"openSUSE Security Update : samba (openSUSE-SU-2012:0507-1)");
      script_summary(english:"Check for the openSUSE-2012-223 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "  - Add the ldapsmb sources as else patches against them
        have no chance to apply.
    
      - Samba pre-3.6.4 are affected by a vulnerability that
        allows remote code exe- cution as the 'root' user; PIDL
        based autogenerated code allows overwriting beyond of
        allocated array; CVE-2012-1182; (bso#8815);
        (bnc#752797).
    
      - s3-winbindd: Only use SamLogonEx when we can get
        unencrypted session keys; (bso#8599).
    
      - Correctly handle DENY ACEs when privileges apply;
        (bso#8797).
    
      - s3:smb2_server: fix a logic error, we should sign non
        guest sessions; (bso8749).
    
      - Allow vfs_aio_pthread to build as a static module;
        (bso#8723).
    
      - s3:dbwrap_ctdb: return the number of records in
        db_ctdb_traverse() for persistent dbs; (#bso8527).
    
      - s3: segfault in dom_sid_compare(bso#8567).
    
      - Honor SeTakeOwnershiPrivilege when client asks for
        SEC_STD_WRITE_OWNER; (bso#8768).
    
      - s3-winbindd: Close netlogon connection if the status
        returned by the NetrSamLogonEx call is timeout in the
        pam_auth_crap path; (bso#8771).
    
      - s3-winbindd: set the can_do_validation6 also for trusted
        domain; (bso#8599).
    
      - Fix problem when calculating the share security mask,
        take priviliges into account for the connecting user;
        (bso#8784).
    
      - Fix crash in dcerpc_lsa_lookup_sids_noalloc() with over
        1000 groups; (bso#8807); (bnc#751454).
    
      - Remove obsoleted Authors lines from spec file for
        post-11.2 systems.
    
      - Make ldapsmb build with Fedora 15 and 16; (bso#8783).
    
      - BuildRequire libuuid-devel for post-11.0 and other
        systems.
    
      - Define missing python macros for non SUSE systems.
    
      - PreReq to fillup_prereq and insserv_prereq only on SUSE
        systems.
    
      - Always use cifstab instead of smbfstab on non SUSE
        systems.
    
      - Ensure AndX offsets are increasing strictly
        monotonically in pre-3.4 versions; CVE-2012-0870;
        (bnc#747934).
    
      - Add SERVERID_UNIQUE_ID_NOT_TO_VERIFY; (bso#8760);
        (bnc#741854).
    
      - s3-printing: fix crash in printer_list_set_printer();
        (bso#8762); (bnc#746825)."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=741854"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=746825"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=747934"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=751454"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=752797"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2012-04/msg00035.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected samba packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/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:"metasploit_name", value:'Samba SetInformationPolicy AuditEventsInfo Heap Overflow');
      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:novell:opensuse:ldapsmb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libldb-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libldb1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libldb1-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libldb1-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libldb1-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libnetapi-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libnetapi0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libnetapi0-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbclient-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbclient0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbclient0-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbclient0-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbclient0-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbsharemodes-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbsharemodes0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libsmbsharemodes0-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtalloc-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtalloc2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtalloc2-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtalloc2-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtalloc2-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtdb-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtdb1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtdb1-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtdb1-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtdb1-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtevent-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtevent0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtevent0-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtevent0-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtevent0-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libwbclient-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libwbclient0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libwbclient0-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libwbclient0-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libwbclient0-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-client-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-client-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-client-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-debugsource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-krb-printing");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-krb-printing-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-winbind");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-winbind-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-winbind-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:samba-winbind-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:12.1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/04/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      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/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE12\.1)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "12.1", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE12.1", reference:"ldapsmb-1.34b-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libldb-devel-1.0.2-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libldb1-1.0.2-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libldb1-debuginfo-1.0.2-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libnetapi-devel-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libnetapi0-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libnetapi0-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libsmbclient-devel-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libsmbclient0-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libsmbclient0-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libsmbsharemodes-devel-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libsmbsharemodes0-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libsmbsharemodes0-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtalloc-devel-2.0.5-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtalloc2-2.0.5-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtalloc2-debuginfo-2.0.5-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtdb-devel-1.2.9-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtdb1-1.2.9-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtdb1-debuginfo-1.2.9-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtevent-devel-0.9.11-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtevent0-0.9.11-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libtevent0-debuginfo-0.9.11-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libwbclient-devel-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libwbclient0-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"libwbclient0-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-client-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-client-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-debugsource-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-devel-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-krb-printing-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-krb-printing-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-winbind-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", reference:"samba-winbind-debuginfo-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libldb1-32bit-1.0.2-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libldb1-debuginfo-32bit-1.0.2-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libsmbclient0-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libsmbclient0-debuginfo-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libtalloc2-32bit-2.0.5-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libtalloc2-debuginfo-32bit-2.0.5-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libtdb1-32bit-1.2.9-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libtdb1-debuginfo-32bit-1.2.9-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libtevent0-32bit-0.9.11-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libtevent0-debuginfo-32bit-0.9.11-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libwbclient0-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"libwbclient0-debuginfo-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"samba-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"samba-client-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"samba-client-debuginfo-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"samba-debuginfo-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"samba-winbind-32bit-3.6.3-34.11.1") ) flag++;
    if ( rpm_check(release:"SUSE12.1", cpu:"x86_64", reference:"samba-winbind-debuginfo-32bit-3.6.3-34.11.1") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ldapsmb / libldb-devel / libldb1 / libldb1-32bit / etc");
    }
    
  • NASL familyMisc.
    NASL idSAMBA_3_4_0.NASL
    descriptionThe version of Samba running on the remote host is prior to 3.4.0. It is, therefore, affected by a remote code execution vulnerability in process.c due to a heap-based buffer overflow. An unauthenticated, remote attacker can exploit this to bypass authentication and execute arbitrary commands via Batched / AndX request. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-06-01
    modified2020-06-02
    plugin id122058
    published2019-02-08
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/122058
    titleSamba < 3.4.0 Remote Code Execution Vulnerability
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(122058);
      script_version("1.3");
      script_cvs_date("Date: 2019/10/31 15:18:51");
    
      script_cve_id("CVE-2012-0870");
      script_bugtraq_id(52103);
    
      script_name(english:"Samba < 3.4.0 Remote Code Execution Vulnerability");
      script_summary(english:"Checks the version of Samba.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Samba server is affected by a remote code execution vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The version of Samba running on the remote host is prior to
    3.4.0. It is, therefore, affected by a remote code execution
    vulnerability in process.c due to a heap-based buffer overflow.  An 
    unauthenticated, remote attacker can exploit this to bypass authentication 
    and execute arbitrary commands via Batched / AndX request.
    
    Note that Nessus has not tested for this issue but has instead relied
    only on the application's self-reported version number.");
      script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2012-0870.html");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to Samba version 3.4.0 or later.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/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:N/AC:L/PR:N/UI:R/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-2012-0870");
    
      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:"2008/08/22");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/08/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/02/08");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:samba:samba");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Misc.");
    
      script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("smb_nativelanman.nasl");
      script_require_keys("SMB/NativeLanManager", "SMB/samba", "Settings/ParanoidReport");
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("vcf.inc");
    include("vcf_extras.inc");
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    app = vcf::samba::get_app_info();
    vcf::check_granularity(app_info:app, sig_segments:3);
    
    constraints = 
    [
      {"fixed_version" : "3.4.0"}
    ];
    
    vcf::check_version_and_report(app_info:app, constraints:constraints, severity:SECURITY_HOLE, strict:FALSE);
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1374-1.NASL
    descriptionAndy Davis discovered that Samba incorrectly handled certain AndX offsets. A remote attacker could send a specially crafted request to the server and cause a denial of service, or possibly execute arbitrary code. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id58131
    published2012-02-27
    reporterUbuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/58131
    titleUbuntu 8.04 LTS : samba vulnerability (USN-1374-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-1374-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(58131);
      script_version("1.8");
      script_cvs_date("Date: 2019/09/19 12:54:27");
    
      script_cve_id("CVE-2012-0870");
      script_bugtraq_id(52103);
      script_xref(name:"USN", value:"1374-1");
    
      script_name(english:"Ubuntu 8.04 LTS : samba vulnerability (USN-1374-1)");
      script_summary(english:"Checks dpkg output for updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Ubuntu host is missing a security-related patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Andy Davis discovered that Samba incorrectly handled certain AndX
    offsets. A remote attacker could send a specially crafted request to
    the server and cause a denial of service, or possibly execute
    arbitrary code.
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://usn.ubuntu.com/1374-1/"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected samba package.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:samba");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:8.04:-:lts");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/02/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/02/27");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(8\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 8.04", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) 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, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"8.04", pkgname:"samba", pkgver:"3.0.28a-1ubuntu4.17")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "samba");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_CIFS-MOUNT-7985.NASL
    descriptionThis update of Samba fixes a heap-based buffer overflow that could be exploited by remote, unauthenticated attackers to crash the smbd daemon or potentially execute arbitrary code via specially crafted SMB AndX request packets. (CVE-2012-0870) Also fixed two non security bugs : - Fix to handle domain join using NetBIOS name;. (bnc#633729) - Fixed the DFS referral response for msdfs root;. (bnc#703655)
    last seen2020-06-05
    modified2012-03-09
    plugin id58299
    published2012-03-09
    reporterThis script is Copyright (C) 2012-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/58299
    titleSuSE 10 Security Update : Samba (ZYPP Patch Number 7985)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The text description of this plugin is (C) Novell, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(58299);
      script_version ("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2012-0870");
    
      script_name(english:"SuSE 10 Security Update : Samba (ZYPP Patch Number 7985)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote SuSE 10 host is missing a security-related patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update of Samba fixes a heap-based buffer overflow that could be
    exploited by remote, unauthenticated attackers to crash the smbd
    daemon or potentially execute arbitrary code via specially crafted SMB
    AndX request packets. (CVE-2012-0870)
    
    Also fixed two non security bugs :
    
      - Fix to handle domain join using NetBIOS name;.
        (bnc#633729)
    
      - Fixed the DFS referral response for msdfs root;.
        (bnc#703655)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-0870.html"
      );
      script_set_attribute(attribute:"solution", value:"Apply ZYPP patch number 7985.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:suse:suse_linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/02/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/03/09");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2012-2020 Tenable Network Security, Inc.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled.");
    if (!get_kb_item("Host/SuSE/release")) exit(0, "The host is not running SuSE.");
    if (!get_kb_item("Host/SuSE/rpm-list")) exit(1, "Could not obtain the list of installed packages.");
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) exit(1, "Failed to determine the architecture type.");
    if (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") exit(1, "Local checks for SuSE 10 on the '"+cpu+"' architecture have not been implemented.");
    
    
    flag = 0;
    if (rpm_check(release:"SLED10", sp:4, reference:"cifs-mount-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"ldapsmb-1.34b-25.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"libsmbclient-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"libsmbclient-devel-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"samba-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"samba-client-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"samba-krb-printing-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"samba-vscan-0.3.6b-43.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, reference:"samba-winbind-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, cpu:"x86_64", reference:"libsmbclient-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, cpu:"x86_64", reference:"samba-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, cpu:"x86_64", reference:"samba-client-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLED10", sp:4, cpu:"x86_64", reference:"samba-winbind-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"cifs-mount-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"ldapsmb-1.34b-25.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"libmsrpc-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"libmsrpc-devel-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"libsmbclient-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"libsmbclient-devel-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"samba-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"samba-client-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"samba-krb-printing-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"samba-python-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"samba-vscan-0.3.6b-43.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, reference:"samba-winbind-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, cpu:"x86_64", reference:"libsmbclient-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, cpu:"x86_64", reference:"samba-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, cpu:"x86_64", reference:"samba-client-32bit-3.0.36-0.13.18.1")) flag++;
    if (rpm_check(release:"SLES10", sp:4, cpu:"x86_64", reference:"samba-winbind-32bit-3.0.36-0.13.18.1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else exit(0, "The host is not affected.");
    
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20120223_SAMBA_ON_SL5_X.NASL
    descriptionSamba is a suite of programs used by machines to share files, printers, and other information. An input validation flaw was found in the way Samba handled Any Batched (AndX) requests. A remote, unauthenticated attacker could send a specially crafted SMB packet to the Samba server, possibly resulting in arbitrary code execution with the privileges of the Samba server (root). (CVE-2012-0870) Users of Samba are advised to upgrade to these updated packages, which contain a backported patch to resolve this issue. After installing this update, the smb service will be restarted automatically.
    last seen2020-03-18
    modified2012-08-01
    plugin id61276
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/61276
    titleScientific Linux Security Update : samba on SL5.x i386/x86_64 (20120223)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text is (C) Scientific Linux.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(61276);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2012-0870");
    
      script_name(english:"Scientific Linux Security Update : samba on SL5.x i386/x86_64 (20120223)");
      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:
    "Samba is a suite of programs used by machines to share files,
    printers, and other information.
    
    An input validation flaw was found in the way Samba handled Any
    Batched (AndX) requests. A remote, unauthenticated attacker could send
    a specially crafted SMB packet to the Samba server, possibly resulting
    in arbitrary code execution with the privileges of the Samba server
    (root). (CVE-2012-0870)
    
    Users of Samba are advised to upgrade to these updated packages, which
    contain a backported patch to resolve this issue. After installing
    this update, the smb service will be restarted automatically."
      );
      # https://listserv.fnal.gov/scripts/wa.exe?A2=ind1202&L=scientific-linux-errata&T=0&P=4294
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?cdc05cc0"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:libsmbclient");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:libsmbclient-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-swat");
      script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/02/23");
      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-2020 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:"libsmbclient-3.0.33-3.38.el5_8")) flag++;
    if (rpm_check(release:"SL5", reference:"libsmbclient-devel-3.0.33-3.38.el5_8")) flag++;
    if (rpm_check(release:"SL5", reference:"samba-3.0.33-3.38.el5_8")) flag++;
    if (rpm_check(release:"SL5", reference:"samba-client-3.0.33-3.38.el5_8")) flag++;
    if (rpm_check(release:"SL5", reference:"samba-common-3.0.33-3.38.el5_8")) flag++;
    if (rpm_check(release:"SL5", reference:"samba-debuginfo-3.0.33-3.38.el5_8")) flag++;
    if (rpm_check(release:"SL5", reference:"samba-swat-3.0.33-3.38.el5_8")) 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, "libsmbclient / libsmbclient-devel / samba / samba-client / etc");
    }
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201206-22.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201206-22 (Samba: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in Samba. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could possibly execute arbitrary code with root privileges, cause a Denial of Service condition, take ownership of shared files, or bypass file permissions. Furthermore, a local attacker may be able to cause a Denial of Service condition or obtain sensitive information in a Samba credentials file. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id59675
    published2012-06-25
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/59675
    titleGLSA-201206-22 : Samba: Multiple vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 201206-22.
    #
    # The advisory text is Copyright (C) 2001-2016 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(59675);
      script_version("1.12");
      script_cvs_date("Date: 2018/07/11 17:09:26");
    
      script_cve_id("CVE-2009-2906", "CVE-2009-2948", "CVE-2010-0728", "CVE-2010-1635", "CVE-2010-1642", "CVE-2010-2063", "CVE-2010-3069", "CVE-2011-0719", "CVE-2011-1678", "CVE-2011-2724", "CVE-2012-0870", "CVE-2012-1182", "CVE-2012-2111");
      script_bugtraq_id(36572, 36573, 38326, 38606, 40097, 40884, 43212, 46597, 49939, 52103, 52973, 53307);
      script_xref(name:"GLSA", value:"201206-22");
    
      script_name(english:"GLSA-201206-22 : Samba: Multiple vulnerabilities");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-201206-22
    (Samba: Multiple vulnerabilities)
    
        Multiple vulnerabilities have been discovered in Samba. Please review
          the CVE identifiers referenced below for details.
      
    Impact :
    
        A remote attacker could possibly execute arbitrary code with root
          privileges, cause a Denial of Service condition, take ownership of shared
          files, or bypass file permissions. Furthermore, a local attacker may be
          able to cause a Denial of Service condition or obtain sensitive
          information in a Samba credentials file.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/201206-22"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Samba users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=net-fs/samba-3.5.15'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/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:"metasploit_name", value:'Samba SetInformationPolicy AuditEventsInfo Heap Overflow');
      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(264);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:samba");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/06/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/06/25");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"net-fs/samba", unaffected:make_list("ge 3.5.15"), vulnerable:make_list("lt 3.5.15"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "Samba");
    }
    
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20120223_SAMBA_ON_SL4_X.NASL
    descriptionSamba is a suite of programs used by machines to share files, printers, and other information. An input validation flaw was found in the way Samba handled Any Batched (AndX) requests. A remote, unauthenticated attacker could send a specially crafted SMB packet to the Samba server, possibly resulting in arbitrary code execution with the privileges of the Samba server (root). (CVE-2012-0870) Users of Samba are advised to upgrade to these updated packages, which contain a backported patch to resolve this issue. After installing this update, the smb service will be restarted automatically.
    last seen2020-03-18
    modified2012-08-01
    plugin id61275
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/61275
    titleScientific Linux Security Update : samba on SL4.x i386/x86_64 (20120223)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text is (C) Scientific Linux.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(61275);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2012-0870");
    
      script_name(english:"Scientific Linux Security Update : samba on SL4.x i386/x86_64 (20120223)");
      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:
    "Samba is a suite of programs used by machines to share files,
    printers, and other information.
    
    An input validation flaw was found in the way Samba handled Any
    Batched (AndX) requests. A remote, unauthenticated attacker could send
    a specially crafted SMB packet to the Samba server, possibly resulting
    in arbitrary code execution with the privileges of the Samba server
    (root). (CVE-2012-0870)
    
    Users of Samba are advised to upgrade to these updated packages, which
    contain a backported patch to resolve this issue. After installing
    this update, the smb service will be restarted automatically."
      );
      # https://listserv.fnal.gov/scripts/wa.exe?A2=ind1202&L=scientific-linux-errata&T=0&P=3913
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?efe79c7e"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:M/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:samba-swat");
      script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/02/23");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/02/23");
      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-2020 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:"^4([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Scientific Linux 4.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:"SL4", reference:"samba-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"SL4", reference:"samba-client-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"SL4", reference:"samba-common-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"SL4", reference:"samba-debuginfo-3.0.33-0.35.el4")) flag++;
    if (rpm_check(release:"SL4", reference:"samba-swat-3.0.33-0.35.el4")) 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, "samba / samba-client / samba-common / samba-debuginfo / samba-swat");
    }
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_SECUPD2012-002.NASL
    descriptionThe remote host is running a version of Mac OS X 10.6 that does not have Security Update 2012-002 applied. This update contains multiple security-related fixes for the following components : - curl - Directory Service - ImageIO - libarchive - libsecurity - libxml - Quartz Composer - QuickTime - Ruby - Samba - Security Framework
    last seen2020-06-01
    modified2020-06-02
    plugin id59067
    published2012-05-10
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/59067
    titleMac OS X Multiple Vulnerabilities (Security Update 2012-002) (BEAST)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_LDAPSMB-120415.NASL
    descriptionThe following issues have been fixed in Samba : - PIDL based autogenerated code uses client supplied size values which allows attackers to write beyond the allocated array size. (CVE-2012-1182) - Ensure AndX offsets are increasing strictly monotonically in pre-3.4 versions. (CVE-2012-0870) - Fix memory leak in parent smbd on connection Also the following non-security bugs have been fixed :. (CVE-2012-0817) - s3-winbindd: Only use SamLogonEx when we can get unencrypted session keys; (bso#8599). - Correctly handle DENY ACEs when privileges apply; (bso#8797). - s3:smb2_server: fix a logic error, we should sign non guest sessions; (bso8749). - Allow vfs_aio_pthread to build as a static module; (bso#8723). - s3:dbwrap_ctdb: return the number of records in db_ctdb_traverse() for persistent dbs; (#bso8527). - s3: segfault in dom_sid_compare(bso#8567). - Honor SeTakeOwnershiPrivilege when client asks for SEC_STD_WRITE_OWNER; (bso#8768). - s3-winbindd: Close netlogon connection if the status returned by the NetrSamLogonEx call is timeout in the pam_auth_crap path; (bso#8771). - s3-winbindd: set the can_do_validation6 also for trusted domain; (bso#8599). - Fix problem when calculating the share security mask, take priviliges into account for the connecting user; (bso#8784). - Fix crash in dcerpc_lsa_lookup_sids_noalloc() with over 1000 groups; (bso#8807);. (bnc#751454) - Add SERVERID_UNIQUE_ID_NOT_TO_VERIFY; (bso#8760);. (bnc#741854) - s3-printing: fix crash in printer_list_set_printer(); (bso#8762);. (bnc#746825) - s3:winbindd fix a return code check; (bso#8406). - s3: Add rmdir operation to streams_depot; (bso#8733). - s3:smbd:smb2: fix an assignment-instead-of-check bug conn_snum_used(); (bso#8738). - s3:auth: fill the sids array of the info3 in wbcAuthUserInfo_to_netr_SamInfo3(); (bso#8739). - Do not map POSIX execute permission to Windows FILE_READ_ATTRIBUTES; (bso#8631);. (bnc#732572) - Remove all precompiled idl output to ensure any pidl changes take effect;. (bnc#757080)
    last seen2020-06-05
    modified2012-04-17
    plugin id58767
    published2012-04-17
    reporterThis script is Copyright (C) 2012-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/58767
    titleSuSE 11.2 Security Update : Samba (SAT Patch Number 6145)
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2012-0332.NASL
    descriptionFrom Red Hat Security Advisory 2012:0332 : Updated samba packages that fix one security issue are now available for Red Hat Enterprise Linux 4 and 5, and Red Hat Enterprise Linux 5.3 Long Life, and 5.6 Extended Update Support. The Red Hat Security Response Team has rated this update as having critical security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. Samba is a suite of programs used by machines to share files, printers, and other information. An input validation flaw was found in the way Samba handled Any Batched (AndX) requests. A remote, unauthenticated attacker could send a specially crafted SMB packet to the Samba server, possibly resulting in arbitrary code execution with the privileges of the Samba server (root). (CVE-2012-0870) Red Hat would like to thank the Samba team for reporting this issue. Upstream acknowledges Andy Davis of NGS Secure as the original reporter. Users of Samba are advised to upgrade to these updated packages, which contain a backported patch to resolve this issue. After installing this update, the smb service will be restarted automatically.
    last seen2020-06-01
    modified2020-06-02
    plugin id68490
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/68490
    titleOracle Linux 4 / 5 : samba (ELSA-2012-0332)

Redhat

advisories
bugzilla
id795509
title) request processing infinite recursion and heap-based buffer overflow
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 4 is installed
      ovaloval:com.redhat.rhba:tst:20070304025
    • OR
      • AND
        • commentsamba is earlier than 0:3.0.33-0.35.el4
          ovaloval:com.redhat.rhsa:tst:20120332001
        • commentsamba is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060591006
      • AND
        • commentsamba-client is earlier than 0:3.0.33-0.35.el4
          ovaloval:com.redhat.rhsa:tst:20120332003
        • commentsamba-client is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060591004
      • AND
        • commentsamba-swat is earlier than 0:3.0.33-0.35.el4
          ovaloval:com.redhat.rhsa:tst:20120332005
        • commentsamba-swat is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060591008
      • AND
        • commentsamba-common is earlier than 0:3.0.33-0.35.el4
          ovaloval:com.redhat.rhsa:tst:20120332007
        • commentsamba-common is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060591002
  • AND
    • commentRed Hat Enterprise Linux 5 is installed
      ovaloval:com.redhat.rhba:tst:20070331005
    • OR
      • AND
        • commentlibsmbclient-devel is earlier than 0:3.0.33-3.38.el5_8
          ovaloval:com.redhat.rhsa:tst:20120332010
        • commentlibsmbclient-devel is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20100488011
      • AND
        • commentsamba-common is earlier than 0:3.0.33-3.38.el5_8
          ovaloval:com.redhat.rhsa:tst:20120332012
        • commentsamba-common is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070061004
      • AND
        • commentsamba-client is earlier than 0:3.0.33-3.38.el5_8
          ovaloval:com.redhat.rhsa:tst:20120332014
        • commentsamba-client is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070061002
      • AND
        • commentlibsmbclient is earlier than 0:3.0.33-3.38.el5_8
          ovaloval:com.redhat.rhsa:tst:20120332016
        • commentlibsmbclient is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20100488021
      • AND
        • commentsamba is earlier than 0:3.0.33-3.38.el5_8
          ovaloval:com.redhat.rhsa:tst:20120332018
        • commentsamba is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070061006
      • AND
        • commentsamba-swat is earlier than 0:3.0.33-3.38.el5_8
          ovaloval:com.redhat.rhsa:tst:20120332020
        • commentsamba-swat is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070061008
rhsa
idRHSA-2012:0332
released2012-02-23
severityCritical
titleRHSA-2012:0332: samba security update (Critical)
rpms
  • libsmbclient-0:3.0.33-3.29.el5_6.4
  • libsmbclient-0:3.0.33-3.38.el5_8
  • libsmbclient-devel-0:3.0.33-3.29.el5_6.4
  • libsmbclient-devel-0:3.0.33-3.38.el5_8
  • samba-0:3.0.33-0.35.el4
  • samba-0:3.0.33-3.29.el5_6.4
  • samba-0:3.0.33-3.38.el5_8
  • samba-0:3.0.33-3.7.el5_3.4
  • samba-client-0:3.0.33-0.35.el4
  • samba-client-0:3.0.33-3.29.el5_6.4
  • samba-client-0:3.0.33-3.38.el5_8
  • samba-client-0:3.0.33-3.7.el5_3.4
  • samba-common-0:3.0.33-0.35.el4
  • samba-common-0:3.0.33-3.29.el5_6.4
  • samba-common-0:3.0.33-3.38.el5_8
  • samba-common-0:3.0.33-3.7.el5_3.4
  • samba-debuginfo-0:3.0.33-0.35.el4
  • samba-debuginfo-0:3.0.33-3.29.el5_6.4
  • samba-debuginfo-0:3.0.33-3.38.el5_8
  • samba-debuginfo-0:3.0.33-3.7.el5_3.4
  • samba-swat-0:3.0.33-0.35.el4
  • samba-swat-0:3.0.33-3.29.el5_6.4
  • samba-swat-0:3.0.33-3.38.el5_8
  • samba-swat-0:3.0.33-3.7.el5_3.4

Seebug

bulletinFamilyexploit
descriptionNo description provided by source.
idSSV:30147
last seen2017-11-19
modified2012-02-28
published2012-02-28
reporterRoot
titleSamba 'AndX'请求堆缓冲区溢出漏洞(CVE-2012-0870)