CVE-2024-50612: libsndfile through 1.2.2 has an ogg_vorbis.c vorbis_analysis_wrote out-of-bounds read.
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.08319%
CWE
Published
10/28/2024
Updated
10/30/2024
KEV Status
No
Technology
-
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability CVE-2024-50612 is an out-of-bounds read in the vorbis_analysis_wrote function, which is part of the external libvorbis library. However, the vulnerability is triggered by libsndfile's usage of this function, specifically within src/ogg_vorbis.c.
The analysis of the provided commit 274198fd95152b412ada49be059258ec0efca272 (which fixes issue #1035, related to this CVE) shows modifications in two key functions:
vorbis_close: The crash log from the issue report explicitly showsvorbis_closecallingvorbis_analysis_wroteat line 417, leading to the crash. The patch removes the direct callvorbis_analysis_wrote(&vdata->vdsp, 0)from this function. This indicates thatvorbis_closewas directly responsible for making the problematic call that triggered the out-of-bounds read.vorbis_write_samples: This function also callsvorbis_analysis_wrote. The patch modifies it to check the return value ofvorbis_analysis_wroteand propagate errors. In the patched code,vorbis_closenow callsvorbis_write_samples(..., 0)to handle the end-of-stream signaling. This means that prior to the patch, ifvorbis_write_sampleswas called within_frames = 0, it would have also triggered the vulnerability due to the unchecked call tovorbis_analysis_wrote. Both functions are insrc/ogg_vorbis.cand were modified to prevent the conditions leading to the out-of-bounds read in the external library. Therefore, they are identified as the vulnerable functions withinlibsndfileas they were the entry points for the problematic interaction withlibvorbis.