CVE-2022-0865
Description
Reachable Assertion in tiffcp in libtiff 4.3.0 allows attackers to cause a denial-of-service via a crafted tiff file. For users that compile libtiff from sources, the fix is available with commit 5e180045.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
36- osv-coords34 versionspkg:rpm/almalinux/libtiffpkg:rpm/almalinux/libtiff-develpkg:rpm/almalinux/libtiff-toolspkg:rpm/opensuse/tiff&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/tiff&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/tiff&distro=openSUSE%20Tumbleweedpkg:rpm/suse/tiff&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/tiff&distro=SUSE%20Enterprise%20Storage%207pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-ESPOSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-ESPOSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP3pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP3pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP4pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCLpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-BCLpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5pkg:rpm/suse/tiff&distro=SUSE%20Manager%20Proxy%204.1pkg:rpm/suse/tiff&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.1pkg:rpm/suse/tiff&distro=SUSE%20Manager%20Server%204.1
< 4.0.9-23.el8+ 33 more
- (no CPE)range: < 4.0.9-23.el8
- (no CPE)range: < 4.0.9-23.el8
- (no CPE)range: < 4.0.9-23.el8
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.3.0-2.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-44.48.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-44.48.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-44.48.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
- (no CPE)range: < 4.0.9-150000.45.8.1
Patches
Vulnerability mechanics
Root cause
"Reachable assertion failure in TIFFReadAndRealloc due to corrupted buffer state when processing a crafted TIFF file."
Attack vector
An attacker provides a crafted TIFF file that, when processed by `tiffcp`, triggers a reachable assertion failure in `TIFFReadAndRealloc` at `tif_read.c:99` [ref_id=1]. The crafted file contains numerous malformed tags, invalid directory ordering, and corrupted Fax4-encoded strip data that cause the internal buffer state to violate the `TIFF_MYBUFFER` flag assertion [ref_id=1]. The attack requires no authentication and is delivered over the network if the victim can be made to run `tiffcp` on the malicious file [ref_id=1].
Affected code
The crash occurs in `TIFFReadAndRealloc` in `tif_read.c:99` [ref_id=1]. The assertion `(tif->tif_flags & TIFF_MYBUFFER) != 0` fails when `tiffcp` processes a crafted TIFF file [ref_id=1]. The issue is reachable through the `tiffcp` utility and is triggered during the reading of malformed TIFF directory entries and strip data [ref_id=1].
What the fix does
The fix is available in commit 5e180045. The patch addresses the assertion failure by ensuring that the buffer state is correctly managed before `TIFFReadAndRealloc` is called, preventing the `TIFF_MYBUFFER` flag from being unexpectedly unset when reading malformed strip data. Users who compile libtiff from sources should apply this commit [ref_id=1].
Preconditions
- inputVictim must run tiffcp on a crafted TIFF file
- authNo authentication required
Reproduction
Use the provided PoC file (`poc`) and run `tiffcp poc /tmp/foo`. The tool will output numerous TIFF warnings and then crash with the assertion failure `tif_read.c:99: TIFFReadAndRealloc: Assertion \`(tif->tif_flags & TIFF_MYBUFFER) != 0' failed.` [ref_id=1].
Generated on May 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RNT2GFNRLOMKJ5KXM6JIHKBNBFDVZPD3/mitrevendor-advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQ4E654ZYUUUQNBKYQFXNK2CV3CPWTM2/mitrevendor-advisory
- security.gentoo.org/glsa/202210-10mitrevendor-advisory
- www.debian.org/security/2022/dsa-5108mitrevendor-advisory
- gitlab.com/gitlab-org/cves/-/blob/master/2022/CVE-2022-0865.jsonmitre
- gitlab.com/libtiff/libtiff/-/issues/385mitre
- gitlab.com/libtiff/libtiff/-/merge_requests/306mitre
- security.netapp.com/advisory/ntap-20221228-0008/mitre
News mentions
0No linked articles in our index yet.