Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: graphics/tiff: fix integer overflows leading to heap overflows
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
ports@openbsd.org
Date:
Tue, 14 Apr 2026 20:58:52 +0200

Download raw body.

Thread
On Tue, Apr 14, 2026 at 06:02:14PM +0200, Christian Weisgerber wrote:
> Grab upstream fixes for integer overflows that lead to heap overflows.
> One is a fix for CVE-2026-4775.  While looking over the commit history,
> I also noticed another fix that looked worthwhile.  This is a game
> of whack-a-mole ...

I checked the patches carefully and tested build/regress on sparc64.

ok tb

> +                     int tv_size = TIFFFieldSetGetSize(fip);
> +-                    raw_data = _TIFFmallocExt(tif, tv_size * value_count);
> ++                    raw_data = _TIFFCheckMalloc(tif, value_count, tv_size,
> ++                                               "for tag data");

I could not exclude a zero-sized allocation here, but this isn't new.