Skip to content

fix out-of-bounds Xsbr write in hf_assembly sinusoid addition - #224

Merged
fabiangreffrath merged 1 commit into
knik0:masterfrom
netliomax25-code:hf-assembly-sbr-oob
Jun 24, 2026
Merged

fix out-of-bounds Xsbr write in hf_assembly sinusoid addition#224
fabiangreffrath merged 1 commit into
knik0:masterfrom
netliomax25-code:hf-assembly-sbr-oob

Conversation

@netliomax25-code

Copy link
Copy Markdown
Contributor

hf_assembly guards the top-band sinusoid leak with if (m + sbr->kx < 64) but writes Xsbr[i + tHFAdj][m + sbr->kx + 1], so when a crafted SBR header makes kx + M reach 64 (the largest value derived_frequency_table allows) the m == M-1 step has m + kx of 63, passes the check, and writes one QMF subband past the 64-wide Xsbr row into the next time slot of the history buffer. The faulty write sits in the SBR_LOW_POWER synthesis path and triggers on a crafted HE-AAC stream whose frequency band layout reaches that boundary. Comparing the index that is actually written keeps the leaked top-band energy from landing out of range.

@fabiangreffrath
fabiangreffrath merged commit 8dade86 into knik0:master Jun 24, 2026
6 checks passed
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.

2 participants