Vulnerabilities > CVE-2018-1052 - Information Exposure vulnerability in Postgresql 10.0/10.1

047910
CVSS 6.5 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
LOW
Confidentiality impact
HIGH
Integrity impact
NONE
Availability impact
NONE
network
low complexity
postgresql
CWE-200
nessus

Summary

Memory disclosure vulnerability in table partitioning was found in postgresql 10.x before 10.2, allowing an authenticated attacker to read arbitrary bytes of server memory via purpose-crafted insert to a partitioned table.

Vulnerable Configurations

Part Description Count
Application
Postgresql
2

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Nessus

  • NASL familyDatabases
    NASL idPOSTGRESQL_20180208.NASL
    descriptionThe version of PostgreSQL installed on the remote host is 9.3.x prior to 9.3.21, 9.4.x prior to 9.4.16, 9.5.x prior to 9.5.11, 9.6.x prior to 9.6.7, or 10.x prior to 10.2. It is, therefore, affected by multiple vulnerabilities.
    last seen2020-06-01
    modified2020-06-02
    plugin id106842
    published2018-02-15
    reporterThis script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/106842
    titlePostgreSQL 9.3.x < 9.3.21 / 9.4.x < 9.4.16 / 9.5.x < 9.5.11 / 9.6.x < 9.6.7 / 10.x < 10.2 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(106842);
      script_version("1.12");
      script_cvs_date("Date: 2019/11/08");
    
      script_cve_id("CVE-2018-1052", "CVE-2018-1053");
      script_bugtraq_id(102986, 102987);
    
      script_name(english:"PostgreSQL 9.3.x < 9.3.21 / 9.4.x < 9.4.16 / 9.5.x < 9.5.11 / 9.6.x < 9.6.7 / 10.x < 10.2 Multiple Vulnerabilities");
      script_summary(english:"Checks the version of PostgreSQL.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote database server is affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of PostgreSQL installed on the remote host is 9.3.x prior
    to 9.3.21, 9.4.x prior to 9.4.16, 9.5.x prior to 9.5.11, 9.6.x prior
    to 9.6.7, or 10.x prior to 10.2. It is, therefore, affected by
    multiple vulnerabilities.");
      script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/about/news/1829/");
      script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/docs/current/release-9-3-21.html");
      script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/docs/current/release-9-4-16.html");
      script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/docs/current/release-9-5-11.html");
      script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/docs/current/release-9-6-7.html");
      script_set_attribute(attribute:"see_also", value:"https://www.postgresql.org/docs/current/release-10-2.html");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PostgreSQL version 9.3.21 / 9.4.16 / 9.5.11 /
    9.6.7 / 10.2 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/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:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-1052");
    
      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:"2018/02/05");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/02/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/02/15");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:postgresql:postgresql");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Databases");
    
      script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("postgresql_version.nbin");
      script_require_ports("Services/postgresql", 5432);
    
      exit(0);
    }
    
    include("vcf.inc");
    include("vcf_extras.inc");
    include("backport.inc");
    
    port = get_service(svc:"postgresql", default:5432, exit_on_fail:TRUE);
    kb_backported = NULL;
    
    version = get_kb_item_or_exit('database/'+port+'/postgresql/version');
    source = get_kb_item_or_exit('database/'+port+'/postgresql/source');
    kb_base = "database/"+port+"/postgresql/";
    
    get_backport_banner(banner:source);
    if (backported)
    {
      if (report_paranoia < 2) audit(AUDIT_BACKPORT_SERVICE, port, 'PostgreSQL server');
      kb_backported = kb_base +"backported";
    }
    
    app_info = vcf::get_app_info(app:"PostgreSQL", port:port, kb_ver:kb_base+"version", kb_backport:kb_backported, service:TRUE);  
    
    #  9.3.21 / 9.4.16 / 9.5.11 / 9.6.7 / 10.2
    constraints = [
      { "min_version" : "9.3", "fixed_version" : "9.3.21" },
      { "min_version" : "9.4", "fixed_version" : "9.4.16" },
      { "min_version" : "9.5", "fixed_version" : "9.5.11" },
      { "min_version" : "9.6", "fixed_version" : "9.6.7" },
      { "min_version" : "10.0", "fixed_version" : "10.2" }
    ];
    
    vcf::postgresql::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
    
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-1_0-0108_POSTGRESQL.NASL
    descriptionAn update of the postgresql package has been released.
    last seen2020-03-17
    modified2019-02-07
    plugin id121809
    published2019-02-07
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/121809
    titlePhoton OS 1.0: Postgresql PHSA-2018-1.0-0108
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    # The descriptive text and package checks in this plugin were
    # extracted from VMware Security Advisory PHSA-2018-1.0-0108. The text
    # itself is copyright (C) VMware, Inc.
    
    
    include('compat.inc');
    
    if (description)
    {
      script_id(121809);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2019/02/07");
    
      script_cve_id("CVE-2018-1052", "CVE-2018-1053");
    
      script_name(english:"Photon OS 1.0: Postgresql PHSA-2018-1.0-0108");
      script_summary(english:"Checks the rpm output for the updated packages.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote PhotonOS host is missing multiple security updates.");
      script_set_attribute(attribute:"description", value:
    "An update of the postgresql package has been released.");
      script_set_attribute(attribute:"see_also", value:"https://github.com/vmware/photon/wiki/Security-Updates-1.0-108.md");
      script_set_attribute(attribute:"solution", value:
    "Update the affected Linux packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      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:N/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-2017-8817");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2018/02/14");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/02/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/02/07");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:postgresql");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:vmware:photonos:1.0");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"PhotonOS Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/PhotonOS/release", "Host/PhotonOS/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/PhotonOS/release");
    if (isnull(release) || release !~ "^VMware Photon") audit(AUDIT_OS_NOT, "PhotonOS");
    if (release !~ "^VMware Photon (?:Linux|OS) 1\.0(\D|$)") audit(AUDIT_OS_NOT, "PhotonOS 1.0");
    
    if (!get_kb_item("Host/PhotonOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "PhotonOS", cpu);
    
    flag = 0;
    
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-debuginfo-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-debuginfo-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-devel-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-devel-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-libs-9.6.7-1.ph1")) flag++;
    if (rpm_check(release:"PhotonOS-1.0", reference:"postgresql-libs-9.6.7-1.ph1")) 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, "postgresql");
    }
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_C602C7910CF411E8A2EC6CC21735F730.NASL
    descriptionThe PostgreSQL project reports : - CVE-2018-1052: Fix the processing of partition keys containing multiple expressions (only for PostgreSQL-10.x) - CVE-2018-1053: Ensure that all temporary files made with
    last seen2020-06-01
    modified2020-06-02
    plugin id106701
    published2018-02-09
    reporterThis script is Copyright (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/106701
    titleFreeBSD : PostgreSQL vulnerabilities (c602c791-0cf4-11e8-a2ec-6cc21735f730)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(106701);
      script_version("3.5");
      script_cvs_date("Date: 2018/11/10 11:49:47");
    
      script_cve_id("CVE-2018-1052", "CVE-2018-1053");
    
      script_name(english:"FreeBSD : PostgreSQL vulnerabilities (c602c791-0cf4-11e8-a2ec-6cc21735f730)");
      script_summary(english:"Checks for updated packages in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote FreeBSD host is missing one or more security-related
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The PostgreSQL project reports :
    
    - CVE-2018-1052: Fix the processing of partition keys containing
    multiple expressions (only for PostgreSQL-10.x)
    
    - CVE-2018-1053: Ensure that all temporary files made with
    'pg_upgrade' are non-world-readable"
      );
      # https://vuxml.freebsd.org/freebsd/c602c791-0cf4-11e8-a2ec-6cc21735f730.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?dc722096"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:P/I:N/A:N");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:postgresql10-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:postgresql93-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:postgresql94-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:postgresql95-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:postgresql96-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2018/02/05");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/02/08");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/02/09");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"postgresql93-server>=9.3.0<9.3.21")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"postgresql94-server>=9.4.0<9.4.16")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"postgresql95-server>=9.5.0<9.5.11")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"postgresql96-server>=9.6.0<9.6.7")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"postgresql10-server>=10.0<10.2")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-1_0-0108.NASL
    descriptionAn update of 'postgresql', 'curl' packages of Photon OS has been released.
    last seen2019-02-21
    modified2019-02-07
    plugin id111919
    published2018-08-17
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=111919
    titlePhoton OS 1.0: Curl / Postgresql PHSA-2018-1.0-0108 (deprecated)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # @DEPRECATED@
    #
    # Disabled on 2/7/2019
    #
    
    # The descriptive text and package checks in this plugin were
    # extracted from VMware Security Advisory PHSA-2018-1.0-0108. The text
    # itself is copyright (C) VMware, Inc.
    
    include("compat.inc");
    
    if (description)
    {
      script_id(111919);
      script_version("1.2");
      script_cvs_date("Date: 2019/02/07 18:59:50");
    
      script_cve_id(
        "CVE-2017-8816",
        "CVE-2017-8817",
        "CVE-2018-1052",
        "CVE-2018-1053",
        "CVE-2018-1000007"
      );
    
      script_name(english:"Photon OS 1.0: Curl / Postgresql PHSA-2018-1.0-0108 (deprecated)");
      script_summary(english:"Checks the rpm output for the updated packages.");
    
      script_set_attribute(attribute:"synopsis", value:
    "This plugin has been deprecated.");
      script_set_attribute(attribute:"description", value:
    "An update of 'postgresql', 'curl' packages of Photon OS has been
    released.");
      # https://github.com/vmware/photon/wiki/Security-Updates-1.0-108
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?1806d113");
      script_set_attribute(attribute:"solution", value:"n/a.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2017-8816");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2018/02/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/08/17");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:curl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:postgresql");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:vmware:photonos:1.0");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"PhotonOS Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/PhotonOS/release", "Host/PhotonOS/rpm-list");
    
      exit(0);
    }
    
    exit(0, "This plugin has been deprecated.");
    
    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/PhotonOS/release");
    if (isnull(release) || release !~ "^VMware Photon") audit(AUDIT_OS_NOT, "PhotonOS");
    if (release !~ "^VMware Photon (?:Linux|OS) 1\.0(\D|$)") audit(AUDIT_OS_NOT, "PhotonOS 1.0");
    
    if (!get_kb_item("Host/PhotonOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "PhotonOS", cpu);
    
    flag = 0;
    
    pkgs = [
      "curl-7.58.0-1.ph1",
      "curl-debuginfo-7.58.0-1.ph1",
      "postgresql-9.6.7-1.ph1",
      "postgresql-debuginfo-9.6.7-1.ph1",
      "postgresql-devel-9.6.7-1.ph1",
      "postgresql-libs-9.6.7-1.ph1"
    ];
    
    foreach (pkg in pkgs)
      if (rpm_check(release:"PhotonOS-1.0", reference:pkg)) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "curl / postgresql");
    }
    
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-2_0-0016_POSTGRESQL.NASL
    descriptionAn update of the postgresql package has been released.
    last seen2020-03-17
    modified2019-02-07
    plugin id121919
    published2019-02-07
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/121919
    titlePhoton OS 2.0: Postgresql PHSA-2018-2.0-0016
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-2_0-0016.NASL
    descriptionAn update of {'linux', 'curl', 'binutils', 'postgresql', 'libtiff'} packages of Photon OS has been released.
    last seen2019-02-21
    modified2019-02-07
    plugin id111286
    published2018-07-24
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=111286
    titlePhoton OS 2.0 : Linux / Postgresql / Binutils / Curl / Libtiff (PhotonOS-PHSA-2018-2.0-0016) (deprecated)