CVE-2022-2056
Description
Divide By Zero error in tiffcrop in libtiff 4.4.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 f3a5e010.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
18- osv-coords16 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%20Leap%20Micro%205.2pkg:rpm/opensuse/tiff&distro=openSUSE%20Tumbleweedpkg: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%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/tiff&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5
< 4.0.9-26.el8_7+ 15 more
- (no CPE)range: < 4.0.9-26.el8_7
- (no CPE)range: < 4.0.9-26.el8_7
- (no CPE)range: < 4.0.9-26.el8_7
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.4.0-2.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-150000.45.11.1
- (no CPE)range: < 4.0.9-44.51.1
- (no CPE)range: < 4.0.9-44.51.1
- (no CPE)range: < 4.0.9-44.51.1
Patches
Vulnerability mechanics
Root cause
"Missing division-by-zero check in `computeOutputPixelOffsets` allows a crafted TIFF to cause a floating-point exception."
Attack vector
An attacker crafts a malicious TIFF file that, when processed by `tiffcrop` with specific command-line flags (`-R 270 -O auto -P 300.0x300.0`), causes a floating-point exception (FPE) in `computeOutputPixelOffsets` [ref_id=1]. The attacker does not need authentication; they only need to deliver the crafted file to a victim who runs `tiffcrop` on it. The crash results in a denial-of-service condition.
Affected code
The vulnerability resides in `tools/tiffcrop.c` at line 5817-5818, within the function `computeOutputPixelOffsets`. The issue is triggered when `tiffcrop` is invoked with the `-R 270` (rotation) and `-P 300.0x300.0` (page width/height) options on a crafted TIFF file [ref_id=1].
What the fix does
The fix is available in commit `f3a5e010` of the libtiff repository. While the exact diff is not shown in the advisory, the commit addresses the divide-by-zero condition in `computeOutputPixelOffsets` at `tools/tiffcrop.c:5817` by adding a check to prevent division by zero when computing pixel offsets [ref_id=1]. Users compiling from source should apply this commit to eliminate the FPE.
Preconditions
- inputVictim must run tiffcrop with the -R (rotation) and -P (page dimensions) flags on the attacker-supplied file
- inputThe crafted TIFF file must trigger a zero divisor in computeOutputPixelOffsets
Reproduction
1. Build libtiff with AddressSanitizer: `CFLAGS="-g -fsanitize=address -fno-omit-frame-pointer" CXXFLAGS="-g -fsanitize=address -fno-omit-frame-pointer" ./configure --prefix=$PWD/build_asan --disable-shared && make -j && make install` [ref_id=1]. 2. Obtain the crafted PoC TIFF file from the issue attachment. 3. Run: `./build_asan/bin/tiffcrop -R 270 -O auto -P 300.0x300.0 poc /tmp/foo` [ref_id=1]. 4. Observe the FPE crash at `computeOutputPixelOffsets` in `tiffcrop.c:5818`.
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/4TSS7MJ7OO7JO5BNKCRYSFU7UAYOKLA2/mitrevendor-advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OXUMJXVEAYFWRO3U3YHKSULHIVDOLEQS/mitrevendor-advisory
- www.debian.org/security/2023/dsa-5333mitrevendor-advisory
- lists.debian.org/debian-lts-announce/2023/01/msg00018.htmlmitremailing-list
- gitlab.com/gitlab-org/cves/-/blob/master/2022/CVE-2022-2056.jsonmitre
- gitlab.com/libtiff/libtiff/-/issues/415mitre
- gitlab.com/libtiff/libtiff/-/merge_requests/346mitre
- security.netapp.com/advisory/ntap-20220826-0001/mitre
News mentions
0No linked articles in our index yet.