Commit 35e857e
committed
audio: copier: avoid serializing uninitialized stream position to host
copier_get_configuration() returns LLP/position data to the host over
IPC4 for IPC4_COPIER_MODULE_CFG_PARAM_LLP_READING and _EXTENDED. It
declared the source 'posn' on the stack without initialization and called
comp_position() ignoring its return value. On Zephyr-native DAI builds
dai_common_position() writes posn.comp_posn only after a successful
dma_get_status(); on a DMA-status error it returns early, leaving
comp_posn uninitialized. The unchecked return then let convert_u64_to_u32s()
serialize uninitialized stack bytes into the host reply (information
disclosure) and report a fabricated stream position.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent 0f9fa75 commit 35e857e
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
| 933 | + | |
934 | 934 | | |
| 935 | + | |
935 | 936 | | |
936 | 937 | | |
937 | 938 | | |
| |||
961 | 962 | | |
962 | 963 | | |
963 | 964 | | |
964 | | - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
965 | 968 | | |
966 | 969 | | |
967 | 970 | | |
| |||
991 | 994 | | |
992 | 995 | | |
993 | 996 | | |
994 | | - | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
995 | 1000 | | |
996 | 1001 | | |
997 | 1002 | | |
| |||
0 commit comments