oss-sec mailing list archives
Re: CVE request: cups - potential integer overflow in PNG image reader [was: CUPS DoS via RSS subscriptions]
From: Tomas Hoger <thoger () redhat com>
Date: Tue, 2 Dec 2008 15:43:45 +0100
On Wed, 26 Nov 2008 14:20:11 -0800 Michael Sweet <mike () easysw com> wrote:
The range of values allowed for xsize is smaller than ysize.OK, thanks for the clarification! But then the first hunk is just a no-op, or I am still missing something? And I am just curious: will it be legitimate to rewrite the second check as (bufsize / img->xsize) / 3 != img->ysize or it is still unsafe due to the possible compiler optimizations?That should be just fine, although I'd still use an extra set of parenthesis to ensure the intended order of operations.
Btw, this issue should not affect any system with recent libpng (in this case, recent seems to be at least 1.2.6rc1 from Aug 2004), as that versions adds (quoting CHANGES file): Imposed default one million column, one-million row limits on the image dimensions, and added png_set_user_limits() function to override them. So if you have recent libpng with those limits unchanged and image with width or height over 1 million (still quite far from what you need for integer overflow when multiplied by 3), you will get: libpng error: image size exceeds user limits in IHDR and libpng calls abort(). That happens before the problematic check is reached (_cupsImageReadPNG() in cups/filter/image-png.c calls png_read_info() in libpng/pngread.c and later png_handle_IHDR() and png_set_IHDR() get called). HTH -- Tomas Hoger / Red Hat Security Response Team
Current thread:
- CVE request: CUPS DoS via RSS subscriptions Kees Cook (Nov 19)
- Re: CVE request: CUPS DoS via RSS subscriptions Steven M. Christey (Nov 20)
- Re: CVE request: CUPS DoS via RSS subscriptions Eygene Ryabinkin (Nov 20)
- Re: CVE request: CUPS DoS via RSS subscriptions Michael Sweet (Nov 21)
- Re: CVE request: cups - potential integer overflow in PNG image reader [was: CUPS DoS via RSS subscriptions] Jan Lieskovsky (Nov 25)
- Re: CVE request: cups - potential integer overflow in PNG image reader [was: CUPS DoS via RSS subscriptions] Eygene Ryabinkin (Nov 25)
- Re: CVE request: cups - potential integer overflow in PNG image reader [was: CUPS DoS via RSS subscriptions] Tomas Hoger (Nov 25)
- Message not available
- Message not available
- Re: CVE request: cups - potential integer overflow in PNG image reader [was: CUPS DoS via RSS subscriptions] Tomas Hoger (Dec 03)
- Re: CVE request: CUPS DoS via RSS subscriptions Eygene Ryabinkin (Nov 20)
- Re: CVE request: CUPS DoS via RSS subscriptions Steven M. Christey (Nov 20)
- <Possible follow-ups>
- Re: CVE request: CUPS DoS via RSS subscriptions Josh Bressers (Nov 19)
- Re: CVE request: CUPS DoS via RSS subscriptions Eygene Ryabinkin (Nov 19)
- Re: CVE request: CUPS DoS via RSS subscriptions Michael Sweet (Nov 19)
- Re: CVE request: CUPS DoS via RSS subscriptions Eygene Ryabinkin (Nov 20)
- Re: CVE request: CUPS DoS via RSS subscriptions Michael R Sweet (Nov 20)
- Re: CVE request: CUPS DoS via RSS subscriptions Eygene Ryabinkin (Nov 19)