OP-TEE / optee_os

Trusted side of the TEE
Other
1.59k stars 1.07k forks source link

plat-stm32mp1: fix use after free in PMIC driver #6956

Closed etienne-lms closed 2 months ago

etienne-lms commented 3 months ago

Fix PMIC regulator levels arrays handling that missed a pointer reset after the buffer is freed. At runtime, pmic_list_voltages() handler function uses that reference and is expected to allocate back the buffer in case non-secure world requests voltage enumeration for the related regulator.

Fixes: a7990eb02b82 ("plat-stm32mp1: set voltage list at pmic driver init")

GseoC commented 2 months ago

No need for my tag, I think this is ready to be merged :)