提交 #1071167: OSGeo libgeotiff master commit 75cfca539667c6483e796b24b78ecef72e311a1a (commit date 2026-08-11) Heap-based Buffer Overflow信息

标题OSGeo libgeotiff master commit 75cfca539667c6483e796b24b78ecef72e311a1a (commit date 2026-08-11) Heap-based Buffer Overflow
描述A vulnerability was found in libgeotiff master commit 75cfca539667c6483e796b24b78ecef72e311a1a and classified as high 8.8. Affected is the cpStripToTile copy loop of the bin/geotifcp.c component (geotifcp.c:944) in the geotifcp command-line utility. The manipulation of the strip/tile geometry tags in a crafted GeoTIFF input file leads to a heap-based buffer overflow: the row/column counts and skew offsets passed to the copy loop are computed from attacker-controlled tags without being validated against the allocated buffer sizes, so the copy runs past the end of a heap buffer. It is possible to launch the attack remotely by delivering the crafted file; user interaction is required because the file must be processed by geotifcp. Technical Details - Affected file/function: bin/geotifcp.c / cpStripToTile() (line 944), reached via readContigTilesIntoBuffer() (line 1062) and writeBufferToContigTiles() (line 1194) through cpContigTiles2ContigTiles() (line 1312) and tiffcp() (line 726); the same unchecked copy pattern recurs in cpContigBufToSeparateBuf (line 957), cpSeparateBufToContigBuf (line 970), readSeparateStripsIntoBuffer (line 1026) and writeBufferToSeparateStrips (line 1154) - Vulnerable parameter: strip/tile geometry derived from the input file's TIFF tags (tile width/length, StripOffsets, StripByteCounts) - Attack vector: Network (crafted file delivered to the party running geotifcp) - Privileges required: None - Trigger condition: geotifcp converts a file whose declared geometry is inconsistent (e.g. nonstandard tile width 1 with incorrect StripOffsets/StripByteCounts counts); with the attached PoC AddressSanitizer deterministically reports "heap-buffer-overflow, READ of size 16" at geotifcp.c:944:13 in cpStripToTile, 1 byte to the right of a 14-byte region, via readContigTilesIntoBuffer; an earlier verification run with a closely related corpus sample aborted at the same line with the WRITE manifestation ("WRITE of size 1", geotifcp.c:944:11 via writeBufferToContigTiles, 0 bytes to the right of a 384-byte region) Impact - Confidentiality: High (out-of-bounds heap read copies adjacent heap memory into the converted output) - Integrity: High (the same unchecked loop writes past the destination heap buffer when the destination bound is exceeded) - Availability: High (deterministic process abort/crash) CVSS v3.1 Score: 8.8 (High) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Timeline - Discovered: 2026-11-01 - Vendor notified: [pending] (public GitHub issue planned at https://github.com/OSGeo/libgeotiff/issues) - Patch released: [pending] - Public disclosure: [pending] Countermeasure Validate the strip/tile geometry before copying: clamp the rows/cols/skew values passed to cpStripToTile() against the real sizes of the source and destination buffers, apply the same validation to the sibling copy helpers (lines 957/970/1026/1154), and error out on inconsistent geometry combinations instead of only warning. Until a fix is available, avoid running geotifcp on untrusted GeoTIFF files.
来源⚠️ https://github.com/OSGeo/libgeotiff/issues/149
用户
 muteki (UID 102683)
提交2026-11-03 02時19分 (25 日前)
管理2026-11-28 08時28分 (25 days later)
状态已接受
VulDB条目445083 [OSGeo libgeotiff 直到 1.7.4 Copy Loop bin/geotifcp.c cpStripToTile tile width/length/StripOffsets/StripByteCounts 内存损坏]
积分20

Do you need the next level of professionalism?

Upgrade your account now!