Check for the Version of postgresql
###############################################################################
# OpenVAS Vulnerability Test
# $Id: gb_suse_2013_0635_1.nasl 8045 2017-12-08 08:39:37Z santu $
#
# SuSE Update for postgresql openSUSE-SU-2013:0635-1 (postgresql)
#
# Authors:
# System Generated Check
#
# Copyright:
# Copyright (C) 2013 Greenbone Networks GmbH, http://www.greenbone.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################
include("revisions-lib.inc");
if(description)
{
script_id(850464);
script_version("$Revision: 8045 $");
script_tag(name:"last_modification", value:"$Date: 2017-12-08 09:39:37 +0100 (Fri, 08 Dec 2017) $");
script_tag(name:"creation_date", value:"2013-11-19 14:05:30 +0530 (Tue, 19 Nov 2013)");
script_cve_id("CVE-2013-1899", "CVE-2013-1900", "CVE-2013-1901");
script_tag(name:"cvss_base", value:"8.5");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:S/C:C/I:C/A:C");
script_name("SuSE Update for postgresql openSUSE-SU-2013:0635-1 (postgresql)");
tag_insight = "
Postgresql was updated to version 9.0.13 (bnc#812525):
* CVE-2013-1899: Fix insecure parsing of server
command-line switches. A connection request containing
a database name that begins with "-" could be crafted
to damage or destroy files within the server's data
directory, even if the request is eventually rejected.
* CVE-2013-1900: Reset OpenSSL randomness state in each
postmaster child process. This avoids a scenario wherein
random numbers generated by "contrib/pgcrypto" functions
might be relatively easy for another database user to
guess. The risk is only significant when the postmaster is
configured with ssl = on but most connections don't use SSL
encryption.
* CVE-2013-1901: Make REPLICATION privilege checks test
current user not authenticated user. An unprivileged
database user could exploit this mistake to call
pg_start_backup() or pg_stop_backup(), thus possibly
interfering with creation of routine backups.
* See the release notes for the rest of the changes:
http://www.postgresql.org/docs/9.0/static/release-9-0-13.htm";
tag_affected = "postgresql on openSUSE 11.4";
tag_solution = "Please Install the Updated Packages.";
script_tag(name : "affected" , value : tag_affected);
script_tag(name : "insight" , value : tag_insight);
script_tag(name : "solution" , value : tag_solution);
script_tag(name:"qod_type", value:"package");
script_tag(name:"solution_type", value:"VendorFix");
script_xref(name: "openSUSE-SU", value: "2013:0635_1");
script_summary("Check for the Version of postgresql");
script_category(ACT_GATHER_INFO);
script_copyright("Copyright (C) 2013 Greenbone Networks GmbH");
script_family("SuSE Local Security Checks");
script_dependencies("gather-package-list.nasl");
script_mandatory_keys("ssh/login/suse", "ssh/login/rpms");
exit(0);
}
include("pkg-lib-rpm.inc");
release = get_kb_item("ssh/login/release");
res = "";
if(release == NULL){
exit(0);
}
if(release == "openSUSE11.4")
{
if ((res = isrpmvuln(pkg:"libecpg6", rpm:"libecpg6~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libecpg6-debuginfo", rpm:"libecpg6-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libpq5", rpm:"libpq5~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libpq5-debuginfo", rpm:"libpq5-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql", rpm:"postgresql~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-contrib", rpm:"postgresql-contrib~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-contrib-debuginfo", rpm:"postgresql-contrib-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-debuginfo", rpm:"postgresql-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-debugsource", rpm:"postgresql-debugsource~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-devel", rpm:"postgresql-devel~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-devel-debuginfo", rpm:"postgresql-devel-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-libs-debugsource", rpm:"postgresql-libs-debugsource~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-plperl", rpm:"postgresql-plperl~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-plperl-debuginfo", rpm:"postgresql-plperl-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-plpython", rpm:"postgresql-plpython~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-plpython-debuginfo", rpm:"postgresql-plpython-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-pltcl", rpm:"postgresql-pltcl~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-pltcl-debuginfo", rpm:"postgresql-pltcl-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-server", rpm:"postgresql-server~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-server-debuginfo", rpm:"postgresql-server-debuginfo~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libpq5-32bit", rpm:"libpq5-32bit~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libpq5-debuginfo-32bit", rpm:"libpq5-debuginfo-32bit~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql-docs", rpm:"postgresql-docs~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libpq5-debuginfo-x86", rpm:"libpq5-debuginfo-x86~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"libpq5-x86", rpm:"libpq5-x86~9.0.13~31.1", rls:"openSUSE11.4")) != NULL)
{
security_message(data:res);
exit(0);
}
if (__pkg_match) exit(99); # Not vulnerable.
exit(0);
}