Commit 2575428
audio: smart_amp: validate DSM parameter id before db write
maxim_dsm_set_param() masks the host-supplied parameter id with
DSM_CH_MASK() and uses the result directly as an index into the
model database db[], which is sized for hspk->param.max_param
parameters. A larger id leads to an out-of-bounds write.
Reject id values that are not below max_param before indexing db[].
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 569e54f commit 2575428
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
388 | 395 | | |
389 | 396 | | |
390 | 397 | | |
| |||
0 commit comments