Bug 617134 (CVE-2010-1868, MOPS-2010-012, MOPS-2010-013)

Summary: CVE-2010-1868 php: sqlite: use of uninitialized memory triggered by empty SQL query (MOPS-2010-012, MOPS-2010-013)
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, jorton, rpm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-23 14:40:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Public test.php PoC from [1]
none
Public exploit.php PoC from [1] none

Description Jan Lieskovsky 2010-07-22 09:42:38 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2010-1868
to the following vulnerability:

The (1) sqlite_single_query and (2) sqlite_array_query functions
in ext/sqlite/sqlite.c in PHP 5.2 through 5.2.13 and 5.3 through
5.3.2 allow context-dependent attackers to execute arbitrary code
by calling these functions with an empty SQL query, which triggers
access of uninitialized memory.

References:
  [1] http://php-security.org/2010/05/07/mops-2010-012-php-sqlite_single_query-uninitialized-memory-usage-vulnerability/index.html
  [2] http://php-security.org/2010/05/07/mops-2010-013-php-sqlite_array_query-uninitialized-memory-usage-vulnerability/index.html
  [3] http://php-security.org/2010/05/07/mops-submission-03-sqlite_single_query-sqlite_array_query-uninitialized-memory-usage/index.html

Comment 5 Tomas Hoger 2010-07-22 10:13:49 UTC
Upstream commit:
  http://svn.php.net/viewvc?view=revision&revision=298697

Comment 9 Tomas Hoger 2010-07-23 14:40:13 UTC
sqlite extension (using SQLite version 2) is not enabled in Red Hat Enterprise Linux or Fedora php packages.  Only pdo-sqlite (in RHEL5 and later) and sqlite3 (in current Fedora and RHEL6 Beta) for SQLite version 3 are enabled.

Statement:

Not vulnerable. This issue did not affect the versions of php as shipped with Red Hat Enterprise Linux 3, 4, or 5, as well as the versions of php53 as shipped with Red Hat Enterprise Linux 5.