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

The Biosig Project libbiosig sopen_FAMOS_read NULL calloc out-of-bounds write vulnerability

An out-of-bounds write vulnerability exists in the sopen_FAMOS_read function of libbiosig when parsing a specially crafted .famos file. An attacker could exploit this to achieve arbitrary code execution.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An out-of-bounds write 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 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

Root cause

The code writes to hdr->CHANNEL[CHAN].bi without ensuring that the CHANNEL array has been allocated with sufficient size, because the array is initially allocated with zero elements and the write occurs before any reallocation.

Impact

This out-of-bounds write could potentially lead to 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 file starting with the magic bytes '|CF,' to be identified as a FAMOS file.
  2. Include a line beginning with 'Cb,1' to trigger the out-of-bounds write to hdr->CHANNEL[CHAN].bi.
  3. Open the file with a program using libbiosig, causing the write to occur.

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 malicious file, it writes data past the end of a 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.

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.