Vulnerabilities > CVE-2016-4983 - Incorrect Permission Assignment for Critical Resource vulnerability in multiple products

047910
CVSS 3.3 - LOW
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
LOW
Confidentiality impact
LOW
Integrity impact
NONE
Availability impact
NONE
local
low complexity
dovecot
opensuse
redhat
CWE-732
nessus

Summary

A postinstall script in the dovecot rpm allows local users to read the contents of newly created SSL/TLS key files.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing Functionality Not Properly Constrained by ACLs
    In applications, particularly web applications, access to functionality is mitigated by the authorization framework, whose job it is to map ACLs to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application or can run queries for data that he is otherwise not supposed to.
  • Privilege Abuse
    An adversary is able to exploit features of the target that should be reserved for privileged users or administrators but are exposed to use by lower or non-privileged accounts. Access to sensitive information and functionality must be controlled to ensure that only authorized users are able to access these resources. If access control mechanisms are absent or misconfigured, a user may be able to access resources that are intended only for higher level users. An adversary may be able to exploit this to utilize a less trusted account to gain information and perform activities reserved for more trusted accounts. This attack differs from privilege escalation and other privilege stealing attacks in that the adversary never actually escalates their privileges but instead is able to use a lesser degree of privilege to access resources that should be (but are not) reserved for higher privilege accounts. Likewise, the adversary does not exploit trust or subvert systems - all control functionality is working as configured but the configuration does not adequately protect sensitive resources at an appropriate level.
  • Directory Indexing
    An adversary crafts a request to a target that results in the target listing/indexing the content of a directory as output. One common method of triggering directory contents as output is to construct a request containing a path that terminates in a directory name rather than a file name since many applications are configured to provide a list of the directory's contents when such a request is received. An adversary can use this to explore the directory tree on a target as well as learn the names of files. This can often end up revealing test files, backup files, temporary files, hidden files, configuration files, user accounts, script contents, as well as naming conventions, all of which can be used by an attacker to mount additional attacks.
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Exploiting Incorrectly Configured Access Control Security Levels
    An attacker exploits a weakness in the configuration of access controls and is able to bypass the intended protection that these measures guard against and thereby obtain unauthorized access to the system or network. Sensitive functionality should always be protected with access controls. However configuring all but the most trivial access control systems can be very complicated and there are many opportunities for mistakes. If an attacker can learn of incorrectly configured access security settings, they may be able to exploit this in an attack. Most commonly, attackers would take advantage of controls that provided too little protection for sensitive activities in order to perform actions that should be denied to them. In some circumstances, an attacker may be able to take advantage of overly restrictive access control policies, initiating denial of services (if an application locks because it unexpectedly failed to be granted access) or causing other legitimate actions to fail due to security. The latter class of attacks, however, is usually less severe and easier to detect than attacks based on inadequate security restrictions. This attack pattern differs from CAPEC 1, "Accessing Functionality Not Properly Constrained by ACLs" in that the latter describes attacks where sensitive functionality lacks access controls, where, in this pattern, the access control is present, but incorrectly configured.

Nessus

  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2016-1342.NASL
    descriptionThis update for dovecot22 fixes the following issues : - dovecot insecure SSL/TLS key and certificate file creation (CVE-2016-4983, bnc#984639)
    last seen2020-06-05
    modified2016-11-23
    plugin id95274
    published2016-11-23
    reporterThis script is Copyright (C) 2016-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/95274
    titleopenSUSE Security Update : dovecot22 (openSUSE-2016-1342)
    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-2016-1342.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(95274);
      script_version("3.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2016-4983");
    
      script_name(english:"openSUSE Security Update : dovecot22 (openSUSE-2016-1342)");
      script_summary(english:"Check for the openSUSE-2016-1342 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update for dovecot22 fixes the following issues :
    
      - dovecot insecure SSL/TLS key and certificate file
        creation (CVE-2016-4983, bnc#984639)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=984639"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected dovecot22 packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:N/A:N");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-backend-mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-backend-mysql-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-backend-pgsql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-backend-pgsql-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-backend-sqlite");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-backend-sqlite-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-debugsource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-lucene");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-lucene-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-solr");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-solr-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-squat");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:dovecot22-fts-squat-debuginfo");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:13.2");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:42.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:42.2");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2019/11/05");
      script_set_attribute(attribute:"patch_publication_date", value:"2016/11/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2016/11/23");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2016-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 !~ "^(SUSE13\.2|SUSE42\.1|SUSE42\.2)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "13.2 / 42.1 / 42.2", 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:"SUSE13.2", reference:"dovecot22-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-backend-mysql-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-backend-mysql-debuginfo-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-backend-pgsql-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-backend-pgsql-debuginfo-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-backend-sqlite-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-backend-sqlite-debuginfo-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-debuginfo-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-debugsource-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-devel-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-fts-lucene-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-fts-lucene-debuginfo-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-fts-solr-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE13.2", reference:"dovecot22-fts-solr-debuginfo-2.2.13-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-backend-mysql-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-backend-mysql-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-backend-pgsql-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-backend-pgsql-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-backend-sqlite-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-backend-sqlite-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-debugsource-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-devel-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-lucene-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-lucene-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-solr-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-solr-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-squat-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.1", reference:"dovecot22-fts-squat-debuginfo-2.2.18-9.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-backend-mysql-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-backend-mysql-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-backend-pgsql-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-backend-pgsql-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-backend-sqlite-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-backend-sqlite-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-debugsource-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-devel-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-lucene-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-lucene-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-solr-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-solr-debuginfo-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-squat-2.2.25-3.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"dovecot22-fts-squat-debuginfo-2.2.25-3.1") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_note(port:0, extra:rpm_report_get());
      else security_note(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "dovecot22 / dovecot22-backend-mysql / etc");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2016-2915-1.NASL
    descriptionThis update for dovecot22 fixes the following issues : - insecure SSL/TLS key and certificate file creation (CVE-2016-4983) (bnc #984639) - Fix LDAP based authentication for some setups (boo #1003952) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE 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 id95369
    published2016-11-28
    reporterThis script is Copyright (C) 2016-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/95369
    titleSUSE SLES12 Security Update : dovecot22 (SUSE-SU-2016:2915-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from SUSE update advisory SUSE-SU-2016:2915-1.
    # The text itself is copyright (C) SUSE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(95369);
      script_version("3.7");
      script_cvs_date("Date: 2019/11/12");
    
      script_cve_id("CVE-2016-4983");
    
      script_name(english:"SUSE SLES12 Security Update : dovecot22 (SUSE-SU-2016:2915-1)");
      script_summary(english:"Checks rpm output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote SUSE host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update for dovecot22 fixes the following issues :
    
      - insecure SSL/TLS key and certificate file creation
        (CVE-2016-4983) (bnc #984639)
    
      - Fix LDAP based authentication for some setups (boo
        #1003952)
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the SUSE 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://bugzilla.suse.com/show_bug.cgi?id=1003952"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=984639"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2016-4983/"
      );
      # https://www.suse.com/support/update/announcement/2016/suse-su-20162915-1/
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?5a91a9fe"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "To install this SUSE Security Update use YaST online_update.
    Alternatively you can run the command listed for your product :
    
    SUSE Linux Enterprise Software Development Kit 12-SP2:zypper in -t
    patch SUSE-SLE-SDK-12-SP2-2016-1703=1
    
    SUSE Linux Enterprise Software Development Kit 12-SP1:zypper in -t
    patch SUSE-SLE-SDK-12-SP1-2016-1703=1
    
    SUSE Linux Enterprise Server for Raspberry Pi 12-SP2:zypper in -t
    patch SUSE-SLE-RPI-12-SP2-2016-1703=1
    
    SUSE Linux Enterprise Server 12-SP2:zypper in -t patch
    SUSE-SLE-SERVER-12-SP2-2016-1703=1
    
    SUSE Linux Enterprise Server 12-SP1:zypper in -t patch
    SUSE-SLE-SERVER-12-SP1-2016-1703=1
    
    To bring your system up-to-date, use 'zypper patch'."
      );
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:N/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:novell:suse_linux:dovecot22");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-backend-mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-backend-mysql-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-backend-pgsql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-backend-pgsql-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-backend-sqlite");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-backend-sqlite-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:dovecot22-debugsource");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:suse_linux:12");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2019/11/05");
      script_set_attribute(attribute:"patch_publication_date", value:"2016/11/25");
      script_set_attribute(attribute:"plugin_publication_date", value:"2016/11/28");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2016-2019 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/cpu", "Host/SuSE/release", "Host/SuSE/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/SuSE/release");
    if (isnull(release) || release !~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "SUSE");
    os_ver = pregmatch(pattern: "^(SLE(S|D)\d+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "SUSE");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(SLES12)$", string:os_ver)) audit(AUDIT_OS_NOT, "SUSE SLES12", "SUSE " + os_ver);
    
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^i[3-6]86$" && "x86_64" >!< cpu && "s390x" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "SUSE " + os_ver, cpu);
    
    sp = get_kb_item("Host/SuSE/patchlevel");
    if (isnull(sp)) sp = "0";
    if (os_ver == "SLES12" && (! preg(pattern:"^(1|2)$", string:sp))) audit(AUDIT_OS_NOT, "SLES12 SP1/2", os_ver + " SP" + sp);
    
    
    flag = 0;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-backend-mysql-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-backend-mysql-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-backend-pgsql-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-backend-pgsql-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-backend-sqlite-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-backend-sqlite-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"1", reference:"dovecot22-debugsource-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-backend-mysql-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-backend-mysql-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-backend-pgsql-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-backend-pgsql-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-backend-sqlite-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-backend-sqlite-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-debuginfo-2.2.13-4.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", cpu:"x86_64", reference:"dovecot22-debugsource-2.2.13-4.1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_note(port:0, extra:rpm_report_get());
      else security_note(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "dovecot22");
    }