Skip to content

Fix heap buffer overflow in BEXT metadata parser (CVE-2026-32837)#1115

Open
deekshaNVIDIA wants to merge 1 commit intomackron:devfrom
deekshaNVIDIA:fix/bext-null-terminator-CVE-2026-32837
Open

Fix heap buffer overflow in BEXT metadata parser (CVE-2026-32837)#1115
deekshaNVIDIA wants to merge 1 commit intomackron:devfrom
deekshaNVIDIA:fix/bext-null-terminator-CVE-2026-32837

Conversation

@deekshaNVIDIA
Copy link
Copy Markdown

The BEXT coding history parser allocates extraBytes + 1 bytes (the +1 for a null terminator) then reads extraBytes from the file, but never writes the null terminator. The subsequent ma_dr_wav__strlen() call scans past the buffer into uninitialized heap memory, causing an unbounded out-of-bounds read.

Null-terminate the buffer at the actual bytes-read position and use the byte count directly for codingHistorySize, eliminating the unsafe strlen call entirely.

Fixes #1101

The BEXT coding history parser allocates extraBytes+1 bytes (the +1
for a null terminator) then reads extraBytes from the file, but never
writes the null terminator. The subsequent ma_dr_wav__strlen() call
scans past the buffer into uninitialized heap memory, causing an
unbounded out-of-bounds read.

Null-terminate the buffer at the actual bytes-read position and use
the byte count directly for codingHistorySize, eliminating the unsafe
strlen call entirely.

Fixes mackron#1101
@deekshaNVIDIA deekshaNVIDIA force-pushed the fix/bext-null-terminator-CVE-2026-32837 branch from b6ff990 to a12a6ed Compare April 15, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant