Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70047 - dev-php/php includes vulnerable version of libgd2
Summary: dev-php/php includes vulnerable version of libgd2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Auditing (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-04 07:10 UTC by Matthias Geerdsen (RETIRED)
Modified: 2005-02-07 07:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Geerdsen (RETIRED) gentoo-dev 2004-11-04 07:10:24 UTC
stuart just pointed out that php4/5 includes gd2

for vulnerabilities in gd2 see bug 69070
Comment 1 SpanKY gentoo-dev 2004-11-04 08:29:44 UTC
see my comments in Bug 69070 where i talked about this :P

basically someone needs to verify this ... the code isnt exactly the same but it stands to reason that it's a problem
Comment 2 Stuart Herbert (RETIRED) gentoo-dev 2004-11-04 15:09:16 UTC
I'll be looking at this on Friday.

Best regards,
Stu
Comment 3 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-08 04:22:59 UTC
Stuart any news on this one?
Comment 4 Stuart Herbert (RETIRED) gentoo-dev 2004-11-08 12:22:20 UTC
Sorry.  I'm awaiting replacements parts after a hardware failure.  Won't be able to commit anything before the weekend.

Best regards,
Stu
Comment 5 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-09 01:06:32 UTC
Robin any chance you will have time to check this before the weekend?
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-09 02:59:39 UTC
Sune: definetly not, sorry. I'm in middle of exams, then i'm away the weekend at the ACM contest regionals (in Portland).
Comment 7 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-09 03:12:40 UTC
Ok, good luck with exams and the contest. One small request though: please use devaway:-)
Comment 8 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-20 02:19:01 UTC
Stuart,Robin please advise.
Comment 9 Stuart Herbert (RETIRED) gentoo-dev 2004-11-23 06:29:42 UTC
I've spoken with Ilia from UPSTREAM, who assures me that PHP's version of gd2 doesn't include this vulnerability.

Best regards,
Stu
Comment 10 Thierry Carrez (RETIRED) gentoo-dev 2004-11-23 06:49:01 UTC
Then we'll assume there is nothing here...
But it looks like a good target for auditing team :)
Comment 11 Tavis Ormandy (RETIRED) gentoo-dev 2005-02-07 07:11:35 UTC
confirmed, the version of gd in the php-4.3.10 distribution is not vulnerable to this.

the advisory describes a user supplied value being passed to malloc() while reading in png data, here's the vulnerable statement from an affected libgd:

image_data = (png_bytep) gdMalloc (rowbytes * height);

where gdMalloc is a simple malloc() wrapper (no validation is performed).

the libgd in php uses this alternative:

image_data = (png_bytep) safe_emalloc(rowbytes, height, 0);

where safe_emalloc() is a comprehensive checking routine that specifically includes checks for overflow.

marking resolved.