The Biosig Project libbiosig Nex parsing out-of-bounds read vulnerability
An out-of-bounds read vulnerability exists in libbiosig's Nex file parsing because an attacker-controlled offset is used without bounds checking. A crafted .nex file can cause an information leak or denial of service.
Originally disclosed on Cisco Talos
An out-of-bounds read vulnerability exists in the Nex parsing functionality of The Biosig Project libbiosig 3.9.0 and Master Branch (35a819fa). A specially crafted .nex file can lead to an information leak.
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 code uses an attacker-controlled offset from the file to compute a pointer into a heap buffer without validating that the offset stays within the buffer's bounds.
Impact
An attacker could leak information from memory or cause a denial of service (crash) by providing a malicious .nex file.
What the attacker needed
Victim opens a malicious .nex file
The fix
The vulnerability was fixed in a vendor patch release.
How it was found
- Craft a .nex file with a large offset value in the per-channel header.
- Open the file with libbiosig, which triggers the Nex parsing code.
- The parser reads the offset and sets hc->bufptr to an address outside the buffer.
- When populating the event table, the code dereferences hc->bufptr, causing an out-of-bounds read.
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 report describes a bug in a library that reads medical signal files. When the library processes a file, it trusts a number stored in the file to decide where to read data from memory. If that number is too large, the library reads from outside the intended memory area, which can crash the program or leak data.
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.