The Biosig Project libbiosig ISHNE ECG Annotations file parsing heap-based buffer overflow vulnerability
A heap-based buffer overflow exists in libbiosig's parsing of ISHNE ECG annotation files. An attacker can supply a crafted file to write attacker-controlled data past a heap buffer, potentially leading to arbitrary code execution.
Originally disclosed on Cisco Talos
A heap-based buffer overflow vulnerability exists in the ISHNE parsing functionality of The Biosig Project libbiosig 3.9.0 and Master Branch (35a819fa). A specially crafted ISHNE ECG annotations file can lead to arbitrary code execution.
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 number of events is calculated as zero when the file size and header length are equal, leading to a tiny heap allocation and subsequent out-of-bounds writes.
Impact
An attacker could write arbitrary data past a heap buffer, potentially leading to arbitrary code execution.
What the attacker needed
Victim opens a malicious ISHNE file
The fix
The vulnerability was fixed by the vendor in a patch release.
How it was found
- Craft an ISHNE annotation file with the magic bytes 'ANN 1.0'.
- Set the header length field to equal the total file size.
- Open the file with libbiosig, triggering the vulnerable parsing path.
- The library allocates a tiny buffer and then writes event data past its end.
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.
This is a memory corruption bug in a library that reads medical signal files. When the library processes a specially crafted file, it writes data beyond the end of a small memory buffer, which can crash the program or let an attacker run their own code.
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.