Bug 864566 (CVE-2014-2020) - VUL-0: CVE-2014-2020: php5: gd missing data type checking allows unauthorized disclosure of information
Summary: VUL-0: CVE-2014-2020: php5: gd missing data type checking allows unauthorized...
Status: RESOLVED INVALID
Alias: CVE-2014-2020
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Deadline: 2015-04-13
Assignee: Petr Gajdos
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/96395/
Whiteboard: maint:running:56288:moderate maint:r...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-19 09:39 UTC by Victor Pereira
Modified: 2015-03-30 15:08 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Pereira 2014-02-19 09:39:12 UTC
CVE-2014-2020

ext/gd/gd.c in PHP 5.5.x before 5.5.9 does not check data types, which might allow remote attackers to obtain sensitive information by using a (1) string or (2) array data type in place of a numeric data type, as demonstrated by an imagecrop function call with a string for the x dimension value, a different vulnerability than CVE-2013-7226.


References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-2020
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2020
Comment 1 Swamp Workflow Management 2014-02-19 09:40:53 UTC
The SWAMPID for this issue is 56288.
This issue was rated as moderate.
Please submit fixed packages until 2014-03-05.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 2 SMASH SMASH 2014-02-19 10:25:35 UTC
Affected packages:

SLE-11-SP3: php53, php5
SLE-10-SP3-TERADATA: php5
SLE-11-SP2: php53, php5
Comment 3 Swamp Workflow Management 2014-02-19 23:00:18 UTC
bugbot adjusting priority
Comment 4 Petr Gajdos 2014-02-20 10:03:31 UTC
(In reply to comment #0)
> ext/gd/gd.c in PHP 5.5.x before 5.5.9 does not check data types, which might

We haven't such php anywhere.
Comment 5 Swamp Workflow Management 2014-02-20 12:19:12 UTC
The SWAMPID for this issue is 56343.
This issue was rated as important.
Please submit fixed packages until 2014-02-27.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 6 Marcus Meissner 2014-02-25 16:36:01 UTC
ext/gd/gd.c is in SLES 11 SP3 php53...

please note that affectedness from CVE entries might occasionaly be misleading and does not include older versions unsupported by upstream.


The patch seems to match the php53 code we have there.
 https://github.com/php/php-src/commit/2938329ce19cb8c4197dec146c3ec887c6f61d01
Comment 7 Petr Gajdos 2014-02-26 07:26:52 UTC
I know, but POCs in the php bug are using imagecrop function, which, as you note in other bug, doesn't exist before php 5.5.x.

Also patches from the bug involves only gd_crop.c and imagecrop function in gd.c.
Have I missed something obvious?
Comment 8 Marcus Meissner 2014-02-27 12:17:21 UTC
The patch had me confused, as it actually does not change imagecrop, but references it.

The problem as it stands is:

This kind of pattern:
        if (zend_hash_find(HASH_OF(z_rect), "width", sizeof("width"), (void **)&tmp) != FAILURE) {
                rect.width = Z_LVAL_PP(tmp);

does not verify that tmp is actually a "LONG" value, it could be a string value or anything else. This would lead to memory corruptions.

(a good pattern would include the convert_to_long() call before.).


While this still lives the small issue that passed in arrays in various functionms got their content changed (converted to long), I would not consider that as a security issue currently.

So yes, this problem here only affects imagecrop().

So yes, it is not relevant for anything but the new products.


Sorry for the mess here.
Comment 9 Swamp Workflow Management 2015-03-30 15:08:59 UTC
An update workflow for this issue was started.
This issue was rated as moderate.
Please submit fixed packages until 2015-04-13.
When done, reassign the bug to security-team@suse.de.
https://swamp.suse.de/webswamp/wf/61384