SoftMaker Office TextMaker Document Record 0x003f integer conversion vulnerability
A signed conversion error in the TextMaker document parser causes a length used to allocate a buffer to be miscalculated, leading to a heap-based out-of-bounds write when the buffer is used. An attacker can entice a victim to open a specially crafted document to trigger memory corruption.
An exploitable signed conversion vulnerability exists in the TextMaker document parsing functionality of SoftMaker Office 2021’s TextMaker application. A specially crafted document can cause the document parser to miscalculate a length used to allocate a buffer, later upon usage of this buffer the application will…
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
Likely an unsigned-to-signed conversion error when calculating a buffer size from a file-controlled length, causing an undersized allocation followed by an out-of-bounds write.
Impact
An attacker could cause heap-based memory corruption, potentially leading to code execution, though the text does not demonstrate a full exploit.
What the attacker needed
Victim opens a crafted document; SoftMaker Office TextMaker 2021
How it was found
- Craft a TextMaker document with the correct file signature and a supported version.
- Include an index table containing a record of type 0x003f.
- Set the record's length field to a value that triggers the signed conversion error.
- Open the document in TextMaker to cause the parser to allocate a too-small buffer and write out of bounds.
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.
A document parser reads a number from the file and uses it to decide how much memory to reserve. Because of a sign mistake, the number can be treated as negative, so the reserved space is too small, and later data is written past the end of that space, corrupting memory. Opening a malicious document is enough to trigger it.
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.