You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
audio: eq_iir: Improve robustness for invalid configuration
Validate the EQ IIR configuration blob and IIR header fields to prevent
out-of-bounds reads and malformed-state setup.
- eq_iir.c, eq_iir.h: Store the blob length returned by
comp_get_data_blob() in a new config_size field, and bound it to
[sizeof(*cd->config), SOF_EQ_IIR_MAX_SIZE] in both eq_iir_prepare
and the runtime new-blob path in eq_iir_process.
- eq_iir_init_coef(): derive coef_words_max from the blob's
self-declared size after rejecting blobs too small to hold the
header and the assign_response[] array. For each declared response,
bound-check that the header fits before reading num_sections, and
verify the full header + biquad record stays within the
coefficient area.
- eq_iir_setup(): reject any mismatch between cd->config->size and the
blob length reported by comp_get_data_blob().
- iir_delay_size_df1(), iir_delay_size_df2t(): range-check
num_sections_in_series; the value is later used to stride the delay
line and parallel-chain loop, and was previously unchecked.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
0 commit comments