cmn700: fix out of bounds access of SYS_CACHE_GRP_REGION register
SYS_CACHE_GRP_REGION[] registers were accessed under the condition of
region_idx < NON_HASH_MEM_REG_COUNT. Since SYS_CACHE_GRP_REGION has only
four registers, access to SYS_CACHE_GRP_REGION[region_idx] could lead to
an out of bound access.
So this patch checks the sam_type to identify the type of the region
being configured and based on that, separate checks are introduced for
the boundary conditions for both NON_HASH_MEM_REGION and
SYS_CACHE_GRP_REGION registers.
Signed-off-by:
Tony K Nadackal <tony.nadackal@arm.com>
Change-Id: I0905897fdf312f8f16911e5eebc4436e45f646fb
Loading
Please register or sign in to comment