제출 #1059414: FastStone Image Viewer 8.5 Out-of-bounds Write정보

제목FastStone Image Viewer 8.5 Out-of-bounds Write
설명FastStone Image Viewer 8.5 contains an out-of-bounds write in its native decoder for uncompressed 4-bit ICO images. The affected FSViewer.exe has SHA-256 05c877e57b25c37e75b8c2a07a5f0ecc31e3b1bb8d12aeb9554c93dcde4ce621. The ICO decoder begins at FSViewer+0x1fed50, with the affected 4-bit branch near +0x1ff82f. It processes ceil(width/2) packed bytes per row and always expands both nibbles of each byte into two 24-bit output pixels. When the declared width is odd, the second nibble of the final byte has no corresponding pixel, but the decoder still performs its three-byte palette-color write without checking the destination width. For widths congruent to 1 modulo 4, that write extends two bytes beyond the DWORD-aligned output row; on the final row, it extends two bytes beyond the entire bitmap pixel buffer. A complete reproducer is a single-image, 21-by-64, 4-bit, uncompressed ICO of 1,150 bytes. Its ICO header has reserved=0, type=1, count=1. Its directory entry has width=21, height=64, planes=1, bit count=4, resource size=1128, and resource offset=22. The resource consists of a 40-byte BITMAPINFOHEADER with width=21, height=128 (color plus mask), planes=1, bit count=4, and BI_RGB compression; sixteen four-byte palette entries; 64 complete XOR rows of 12 bytes each (eleven bytes of 0x12 followed by one zero padding byte per row); and 64 complete AND-mask rows of four zero bytes each. The original palette entry i is BGR0=(8i,8i,8i,00). Windows LoadImageW accepts this ICO. Changing only palette entry 2 at file offsets 70-72 from 10 10 10 to a1 b2 c3 produces a second valid 1,150-byte ICO that demonstrates control over the two out-of-bounds bytes. To confirm the write with a debugger, open the ICO in the hashed 8.5 executable and set breakpoints at FSViewer+0x1ff9fc, immediately before the final pixel's two-byte store, and FSViewer+0x1ffa05, immediately after its last-byte store at +0x1ffa02. Use the actual module base because ASLR can move it. At the last packed-byte pair of the final row, ESI=10 and the row index at [EBP-0x3c] is zero. In this build, [EBP-4] points to the output bitmap object; its pixel base is at object offset +0x1c, width at +0x34, height at +0x38, depth at +0x3c, and stride at +0x40. The live object reports width 21, height 64, depth 24, and stride 64, giving a 4,096-byte pixel buffer. ECX, the destination of the store, equals pixel_base+4095. The three-byte write covers offsets 4095, 4096, and 4097, so bytes 4096 and 4097 are out of bounds. Before and after breakpoints confirmed that these bytes changed from 00 00 to 10 10; with the palette-only variant they changed to b2 c3. A complete 19-by-64 ICO control ended its final store exactly at the pixel-buffer boundary. This is a distinct root cause that has not been addressed by any CVE in the past. This trigger uses an ordinary bit count of four, complete uncompressed ICO data, and the separate ICO decoder's packed-nibble output loop. The confirmed result is a two-byte, file-controlled write beyond the output bitmap pixel buffer in version 8.5. Earlier affected versions have not been established.
사용자
 jacksonstone (UID 56993)
제출2026. 10. 27. PM 02:37 (29 날 ago)
모더레이션2026. 11. 25. PM 04:52 (29 days later)
상태수락
VulDB 항목443909 [FastStone Image Viewer 까지 8.5 ICO Decoder FSViewer.exe 메모리 손상]
포인트들17

Do you want to use VulDB in your project?

Use the official API to access entries easily!