CVE-2022-1056
Description
Out-of-bounds Read error in tiffcrop 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 46dc8fcd.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
33- osv-coords31 versionspkg: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-150000.45.8.1+ 30 more
- (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
"Missing bounds check in extractImageSection causes _TIFFmemcpy to read beyond the allocated heap buffer when processing a crafted TIFF file."
Attack vector
An attacker supplies a crafted TIFF file that, when processed by `tiffcrop` with the `-H` crop-height option (e.g. `tiffcrop -H 341 poc /tmp/foo`), triggers a heap-buffer-overflow read in `_TIFFmemcpy` [ref_id=1]. The malformed file contains numerous invalid or warning-inducing tags (e.g. unknown tags, mismatched color channels, and Fax4 decode errors) that cause `loadImage` to allocate a buffer of insufficient size for the subsequent `extractImageSection` copy operation [ref_id=1]. No authentication or special network access is required; the attacker only needs to deliver the crafted file to a victim running `tiffcrop`.
Affected code
The out-of-bounds read occurs in `_TIFFmemcpy` at `libtiff/tif_unix.c:346`, called from `extractImageSection` in `tools/tiffcrop.c:6854`, which is invoked by `writeImageSections` at `tools/tiffcrop.c:7103` and ultimately from `main` at `tools/tiffcrop.c:2451` [ref_id=1]. The heap buffer was allocated via `_TIFFmalloc` in `loadImage` at `tools/tiffcrop.c:6210` [ref_id=1].
What the fix does
The fix is available in commit `46dc8fcd` [per the CVE description]. The advisory does not include the patch diff, but the issue report [ref_id=1] identifies the root cause as a heap-buffer-overflow in `_TIFFmemcpy` during `extractImageSection`. The remediation ensures that the copy size passed to `_TIFFmemcpy` does not exceed the allocated buffer bounds, preventing the out-of-bounds read that leads to a denial-of-service.
Preconditions
- inputVictim must run tiffcrop on the attacker-supplied file
- inputThe crafted TIFF file must trigger the specific code path in extractImageSection
Reproduction
Build libtiff with AddressSanitizer (`-fsanitize=address`), then run: `./build_asan/bin/tiffcrop -H 341 poc /tmp/foo` using the proof-of-concept file linked in the issue [ref_id=1]. The tool will output numerous TIFF warnings and then crash with a heap-buffer-overflow in `_TIFFmemcpy` [ref_id=1].
Generated on May 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5News mentions
0No linked articles in our index yet.