Incorrect patch for CVE-2022-1355

Related Vulnerabilities: CVE-2022-1355  

Debian Bug report logs - #1011160
Incorrect patch for CVE-2022-1355

version graph

Reported by: bugs@humanleg.org.uk

Date: Tue, 17 May 2022 18:12:25 UTC

Severity: normal

Found in version tiff/4.3.0-7

Fixed in version tiff/4.3.0-8

Done: Laszlo Boszormenyi (GCS) <gcs@debian.org>

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, unknown-package@qa.debian.org:
Bug#1011160; Package libtiff. (Tue, 17 May 2022 18:12:27 GMT) (full text, mbox, link).


Acknowledgement sent to bugs@humanleg.org.uk:
New Bug report received and forwarded. Copy sent to unknown-package@qa.debian.org. (Tue, 17 May 2022 18:12:27 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Robert Scott <bugs@humanleg.org.uk>
To: submit@bugs.debian.org
Subject: Incorrect patch for CVE-2022-1355
Date: Tue, 17 May 2022 19:04:33 +0100
Package: libtiff
Version: 4.3.0-7

In 4.3.0-7 it looks like you've included a patch based on https://gitlab.com/
libtiff/libtiff/-/commit/9752dae8febab08879fc0159e7d387cff14eb3c3 as a fix for 
CVE-2022-1355, but I don't think this is the right patch. You can confirm this 
by building the package with `-fsanitize=address` and running the issue's poc 
command listed at https://gitlab.com/libtiff/libtiff/-/issues/400:

> tiffcp  -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 ./i ./i

When putting together the fix for the NixOS package, I noticed that it still 
triggers AddressSanitizer in an identical way with the patch. I think this 
happened because the commit in question is (mistakenly?) commented with

> Closes #400 et #8

Perhaps this was just a typo on their part.

The good news is that the commit https://gitlab.com/libtiff/libtiff/-/commit/
c1ae29f9ebacd29b7c3e0c7db671af7db3584bc2, merged in https://gitlab.com/
libtiff/libtiff/-/merge_requests/323, applies cleanly (no prerequisite patches 
or patch mangling required) and *does* solve the poc.


robert.






Bug reassigned from package 'libtiff' to 'src:tiff'. Request was from Salvatore Bonaccorso <carnil@debian.org> to control@bugs.debian.org. (Tue, 17 May 2022 19:18:02 GMT) (full text, mbox, link).


No longer marked as found in versions 4.3.0-7. Request was from Salvatore Bonaccorso <carnil@debian.org> to control@bugs.debian.org. (Tue, 17 May 2022 19:18:03 GMT) (full text, mbox, link).


Marked as found in versions tiff/4.3.0-7. Request was from Salvatore Bonaccorso <carnil@debian.org> to control@bugs.debian.org. (Tue, 17 May 2022 19:18:03 GMT) (full text, mbox, link).


Reply sent to Laszlo Boszormenyi (GCS) <gcs@debian.org>:
You have taken responsibility. (Tue, 17 May 2022 20:39:09 GMT) (full text, mbox, link).


Notification sent to bugs@humanleg.org.uk:
Bug acknowledged by developer. (Tue, 17 May 2022 20:39:09 GMT) (full text, mbox, link).


Message #16 received at 1011160-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1011160-close@bugs.debian.org
Subject: Bug#1011160: fixed in tiff 4.3.0-8
Date: Tue, 17 May 2022 20:37:36 +0000
Source: tiff
Source-Version: 4.3.0-8
Done: Laszlo Boszormenyi (GCS) <gcs@debian.org>

We believe that the bug you reported is fixed in the latest version of
tiff, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1011160@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Laszlo Boszormenyi (GCS) <gcs@debian.org> (supplier of updated tiff package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 17 May 2022 21:38:14 +0200
Source: tiff
Architecture: source
Version: 4.3.0-8
Distribution: unstable
Urgency: high
Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Changed-By: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Closes: 1011160
Changes:
 tiff (4.3.0-8) unstable; urgency=high
 .
   * Backport correct security fix for CVE-2022-1355, stack buffer overflow in
     "mode" string (closes: #1011160).
Checksums-Sha1:
 10d87dcadd0e312879af9a76ea1453b3f9eaf43b 2417 tiff_4.3.0-8.dsc
 2f23b306a468d219ba77c999073713bafd25ac80 31164 tiff_4.3.0-8.debian.tar.xz
Checksums-Sha256:
 697f6e03a8f31218ef229223faf05557c999026f3207b2d5535739e18ce2c708 2417 tiff_4.3.0-8.dsc
 0d38f0c73cbbb896ceffc776c8b0dd2b784e5d22289919a49d59399086e97a05 31164 tiff_4.3.0-8.debian.tar.xz
Files:
 63050919d914ce4573d5847f98f5df17 2417 libs optional tiff_4.3.0-8.dsc
 ff9ec6e65de187d38d004ee85c1125b8 31164 libs optional tiff_4.3.0-8.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfYh9yLp7u6e4NeO63OMQ54ZMyL8FAmKD/2gACgkQ3OMQ54ZM
yL/N6Q//Ro50pLTlSbvDt8yp2KBGWlD++z6RKG1b55EYyR/kkZHt9Wpxv/N9E8yq
6blGVcnJZ0rdhsaZKkz0j22iJJ92+aWu9PuXqlbA2CPk1MAMIdW7ueBjkIcHd90s
AoToep6rAiGGQ5/EUa1V/ALhRQfxWpB4L2OEd8jwQdgGFifhQfLPrxrrIwuRw4MX
6rPUlORtFL0atj7GKtOEGl6HUa92iIkEhipWlMHofyGVlod8pgRH5uxxLh609Zfb
otxJBx0OHkTuA2gzAF9r8/mplAWtTyuxEe4T9uvykWklpfcqSJdcTEZvuRky2I54
pZ/B9Kor38NcMdTYeOg+bCzOxBDqpRhO1Gz02Y+LKqHXiBUy+ezeZfvIaHWy+oej
zctZebQi5SXKM6tOfy/sM5mBxXsB7eshT2Ny/Vsz8jzNLAbuTDRBDYTBZniKW585
N/R39ZhyOIOr9Ct/TlyKreGcQld5nVy+DCBj1jXW0kbfz/oiQ+X9f01MSqeWWeHn
3Poo4ROAKQEBs7w5m3OYVWuzQmPD9QBSzyw4RT5bbgP3GwHXNWlgfPP4a3g+GT1V
xtB0WvMb8ciqsF6TCfUWxAb2bUR2YabRYGi2VMWxlGIP/udY1KJk/EPMaf9/ld1T
jsffjFFLnPlW5gF3tnKRIwc/7GeaxGUZ3uQ5mxZmwuLX2XJ5Qms=
=YIgl
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 18 13:12:21 2022; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.