The Biosig Project libbiosig sopen_FAMOS_read integer overflow to out-of-bounds write vulnerability
An integer overflow in the sopen_FAMOS_read function of libbiosig allows a crafted .famos file to cause an out-of-bounds write on the heap, which can lead to arbitrary code execution.
Originally disclosed on Cisco Talos
An integer overflow vulnerability exists in the sopenFAMOSread functionality of The Biosig Project libbiosig 2.5.0 and Master Branch (ab0ee111). A specially crafted .famos file can lead to an out-of-bounds write which in turn 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
Impact
An attacker could cause an out-of-bounds write on the heap, potentially leading to arbitrary code execution.
What the attacker needed
Victim opens a malicious .famos file
The fix
The vendor provided a new release that likely fixes the vulnerability.
How it was found
- Create a .famos file starting with the magic bytes '|CF,' to be recognised as FAMOS format.
- Include a 'CG,1' line with a small channel count to set up the initial buffer.
- Include another 'CG,1' line with a large channel count that overflows the 16-bit channel counter.
- Include a 'CC,1' line to set the channel index to a value beyond the allocated buffer.
- Include a 'Cb,1' line with a controlled value to write out-of-bounds at the channel index.
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. A specially made file can trick the program into writing data outside the memory it reserved, which could let an attacker run their own code on the computer.
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.