OSDN Git Service

msm: sensor: actuator: fix out of bound read for bivcm region params
authorHaibin Liu <haibinl@codeaurora.org>
Tue, 30 Apr 2019 06:16:47 +0000 (14:16 +0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 9 Jul 2019 02:09:41 +0000 (19:09 -0700)
commit1656e2e44ddae9abd52419113d9ab5eb5a10cbc3
tree32762292defff3ce63cc7b6210a5134e99624d58
parenta19883a728162e7e4b66e2810d1892a84841f26c
msm: sensor: actuator: fix out of bound read for bivcm region params

The region index for bivcm is not validated against the region size.
This causes out-of-bound read on the KASAN kernel.
Add restriction that region index smaller than region size.

CRs-Fixed: 2379514
Change-Id: I72c4a41a4b41c8fa70c174ffd3215a81eaa14355
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c