A privilege escalation software vulnerability had been discovered in the Arm Trusted Firmware (imx-atf) component of the NXP BSP.
A privileged local attacker could set or clear the low bit of an arbitrary byte memory in the Trusted Execution Environment (TEE)/TrustZone OS, defeating the isolation of secure memory from the Rich Execution Environment (REE).
Exploitation requires the attacker to execute arbitrary code in REE kernel context or u-boot (Non-secure EL1) to issue Secure Monitor Calls (SMCs).
The domain id is not bounded in the function "imx_gpc_pm_domain_enable", leading to this potential overflow and privilege escalation.
This vulnerability has been addressed from NXP BSP versions L5.10.52-2.1.0-rc1 release and beyond.
For customers using previous NXP BSP releases, the following commit will need to be backported/applied:
----
commit 32e8f05e5df514ff4c948508d9542cfe2729cb55
Author: Jacky Bai <ping.bai@nxp.com>
Date: Tue Jul 13 16:06:29 2021 +0800
LF-4198 plat: imx8m: Fix the potential array overflow
Check the domain_id to make sure the index passed by the Rich-OS does not exceed the range of the domain arrays.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
-----
A patch that addresses this potential security vulnerability has also been attached to this thread.