Check for the Version of php
###############################################################################
# OpenVAS Vulnerability Test
#
# CentOS Update for php CESA-2010:0040 centos3 i386
#
# Authors:
# System Generated Check
#
# Copyright:
# Copyright (c) 2010 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");
tag_insight = "PHP is an HTML-embedded scripting language commonly used with the Apache
HTTP Web server.
Multiple missing input sanitization flaws were discovered in PHP's exif
extension. A specially-crafted image file could cause the PHP interpreter
to crash or, possibly, disclose portions of its memory when a PHP script
tried to extract Exchangeable image file format (Exif) metadata from the
image file. (CVE-2009-2687, CVE-2009-3292)
A missing input sanitization flaw, leading to a buffer overflow, was
discovered in PHP's gd library. A specially-crafted GD image file could
cause the PHP interpreter to crash or, possibly, execute arbitrary code
when opened. (CVE-2009-3546)
It was discovered that PHP did not limit the maximum number of files that
can be uploaded in one request. A remote attacker could use this flaw to
instigate a denial of service by causing the PHP interpreter to use lots of
system resources dealing with requests containing large amounts of files to
be uploaded. This vulnerability depends on file uploads being enabled
(which it is, in the default PHP configuration). (CVE-2009-4017)
Note: This update introduces a new configuration option, max_file_uploads,
used for limiting the number of files that can be uploaded in one request.
By default, the limit is 20 files per request.
It was discovered that PHP was affected by the previously published "null
prefix attack", caused by incorrect handling of NUL characters in X.509
certificates. If an attacker is able to get a carefully-crafted certificate
signed by a trusted Certificate Authority, the attacker could use the
certificate during a man-in-the-middle attack and potentially confuse PHP
into accepting it by mistake. (CVE-2009-3291)
It was discovered that PHP's htmlspecialchars() function did not properly
recognize partial multi-byte sequences for some multi-byte encodings,
sending them to output without them being escaped. An attacker could use
this flaw to perform a cross-site scripting attack. (CVE-2009-4142)
All php users should upgrade to these updated packages, which contain
backported patches to resolve these issues. After installing the updated
packages, the httpd daemon must be restarted for the update to take effect.";
tag_affected = "php on CentOS 3";
tag_solution = "Please Install the Updated Packages.";
if(description)
{
script_xref(name : "URL" , value : "http://lists.centos.org/pipermail/centos-announce/2010-January/016461.html");
script_id(880351);
script_version("$Revision: 8205 $");
script_tag(name:"last_modification", value:"$Date: 2017-12-21 07:30:37 +0100 (Thu, 21 Dec 2017) $");
script_tag(name:"creation_date", value:"2010-01-19 08:58:46 +0100 (Tue, 19 Jan 2010)");
script_tag(name:"cvss_base", value:"9.3");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:N/C:C/I:C/A:C");
script_xref(name: "CESA", value: "2010:0040");
script_cve_id("CVE-2009-2687", "CVE-2009-3291", "CVE-2009-3292", "CVE-2009-3546", "CVE-2009-4017", "CVE-2009-4142");
script_name("CentOS Update for php CESA-2010:0040 centos3 i386");
script_tag(name: "summary" , value: "Check for the Version of php");
script_category(ACT_GATHER_INFO);
script_copyright("Copyright (c) 2010 Greenbone Networks GmbH");
script_family("CentOS Local Security Checks");
script_dependencies("gather-package-list.nasl");
script_mandatory_keys("ssh/login/centos", "ssh/login/rpms");
script_tag(name : "affected" , value : tag_affected);
script_tag(name : "solution" , value : tag_solution);
script_tag(name : "insight" , value : tag_insight);
script_tag(name:"qod_type", value:"package");
script_tag(name:"solution_type", value:"VendorFix");
exit(0);
}
include("pkg-lib-rpm.inc");
release = get_kb_item("ssh/login/release");
res = "";
if(release == NULL){
exit(0);
}
if(release == "CentOS3")
{
if ((res = isrpmvuln(pkg:"php", rpm:"php~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"php-devel", rpm:"php-devel~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"php-imap", rpm:"php-imap~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"php-ldap", rpm:"php-ldap~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"php-mysql", rpm:"php-mysql~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"php-odbc", rpm:"php-odbc~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if ((res = isrpmvuln(pkg:"php-pgsql", rpm:"php-pgsql~4.3.2~54.ent", rls:"CentOS3")) != NULL)
{
security_message(data:res);
exit(0);
}
if (__pkg_match) exit(99); # Not vulnerable.
exit(0);
}