Skip to content
Memory corruption Advisory Advanced CVE-2024-21812

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.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

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.

Lilith >_>, 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

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

  1. Create a .famos file starting with the magic bytes '|CF,' to be recognised as FAMOS format.
  2. Include a 'CG,1' line with a small channel count to set up the initial buffer.
  3. Include another 'CG,1' line with a large channel count that overflows the 16-bit channel counter.
  4. Include a 'CC,1' line to set the channel index to a value beyond the allocated buffer.
  5. 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.

More by Lilith >_>

View all

148 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.