Check for the Version of postgresql92
###############################################################################
# OpenVAS Vulnerability Test
# $Id: gb_suse_2013_0628_1.nasl 8045 2017-12-08 08:39:37Z santu $
#
# SuSE Update for postgresql92 openSUSE-SU-2013:0628-1 (postgresql92)
#
# 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(850546);
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-12-10 13:21:23 +0530 (Tue, 10 Dec 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 postgresql92 openSUSE-SU-2013:0628-1 (postgresql92)");
tag_insight = "
postgresql was updated to version 9.2.4 (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.2/static/release-9-2-4.html'
/usr/share/doc/packages/postgresql92/HISTORY";
tag_affected = "postgresql92 on openSUSE 12.3";
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:0628_1");
script_summary("Check for the Version of postgresql92");
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 == "openSUSE12.3")
{
if ((res = isrpmvuln(pkg:"postgresql92", rpm:"postgresql92~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-contrib", rpm:"postgresql92-contrib~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-contrib-debuginfo", rpm:"postgresql92-contrib-debuginfo~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-debuginfo", rpm:"postgresql92-debuginfo~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-debugsource", rpm:"postgresql92-debugsource~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-plperl", rpm:"postgresql92-plperl~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-plperl-debuginfo", rpm:"postgresql92-plperl-debuginfo~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-plpython", rpm:"postgresql92-plpython~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-plpython-debuginfo", rpm:"postgresql92-plpython-debuginfo~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-pltcl", rpm:"postgresql92-pltcl~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-pltcl-debuginfo", rpm:"postgresql92-pltcl-debuginfo~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-server", rpm:"postgresql92-server~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-server-debuginfo", rpm:"postgresql92-server-debuginfo~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"postgresql92-docs", rpm:"postgresql92-docs~9.2.4~1.4.1", rls:"openSUSE12.3")) != NULL)
{
security_message(data:res);
exit(0);
}
if (__pkg_match) exit(99); # Not vulnerable.
exit(0);
}