Skip to content
Memory corruption Advisory Advanced CVE-2023-28393

Accusoft ImageGear tif_processing_dng_channel_count stack-based buffer overflow vulnerability

A specially crafted TIFF file causes a stack-based buffer overflow in the tif_processing_dng_channel_count function of Accusoft ImageGear 20.1 because a loop count read from the file is used without a bounds check. An attacker could supply a malicious file to corrupt memory and crash the application.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

Medium 5.6 View original

A stack-based buffer overflow vulnerability exists in the tifprocessingdngchannelcount functionality of Accusoft ImageGear 20.1. A specially crafted malformed file can lead to memory corruption.

Emmanuel Tacheau, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The loop that fills a two-element stack array uses a count taken from the file's SamplesPerPixel value without checking it against the array size.

Impact

The overflow corrupts stack memory and crashes the process, with the CVSS score indicating limited impact to confidentiality, integrity and availability.

What the attacker needed

Victim opens a crafted TIFF file; file has DNGVersion and SubIFDs tags

The fix

The vendor released a patch in version 20.3 that addresses the issue.

How it was found

  1. Craft a malformed TIFF file with specific BitsPerSample, DNGVersion and SubIFDs tags.
  2. Load the malformed TIFF in a program using the ImageGear library.
  3. The channel count read from the file drives a loop that writes past the stack array, causing an access violation.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

ImageGear is a library that programs use to open and convert image files. When it reads a TIFF image, it copies a number of values into a small fixed space on the stack, which is a region of memory used for temporary data. The number of copies comes from the file itself, so a crafted file makes it write past that space and corrupt nearby memory, which can crash the program.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Emmanuel Tacheau

View all

58 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.