Skip to content
Commit f16c0ee2 authored by Tony Nadackal's avatar Tony Nadackal Committed by Nicola Mazzucato
Browse files

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 Nadackal's avatarTony K Nadackal <tony.nadackal@arm.com>
Change-Id: I0905897fdf312f8f16911e5eebc4436e45f646fb
parent 9ac0773b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment