Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Apr 2017 07:03:25 +0000
From: "Agostino Sarubbo" <>
To: "" <>
Subject: CVE-2017-7592: libtiff: left shift :

In tif_getimage.c, in function putagreytile, there is a shift of unsigned char
by 24:
*(pp+1) << 24.

Since there is no cast, *(pp+1) is treated as int, so
UndefinedBehaviorSanitizer says:
runtime error: left shift of 134 by 24 places cannot be represented in type

Maybe we could have something like:

*cp++ = BWmap[*pp][0] & ((uint32)*(pp+1) << 24 | ~A1);


Fixed per

2017-01-11 Even Rouault <even.rouault at>

        * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to
        avoid UndefinedBehaviorSanitizer warning.
        Patch by Nicolás Peña.

Agostino Sarubbo
Gentoo Linux Developer

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.