Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34558a5f authored by Lokesh Kumar Aakulu's avatar Lokesh Kumar Aakulu
Browse files

msm: camera: Avoid memory corruption by changing order of enum



SET_POSITION is added above MOVE_FOCUS which makes kernel prone to
memory corruption as MOVE_FOCUS enum is changed. when CFG_POSITION
is not present and userspace calls MOVE_FOCUS kernel misinterprets
MOVE_FOCUS as SET_POSITION and thus copies user structure to wrong
structure and makes memory to corrupt.

Change-Id: I335ee28d9af6ec25b00262d71701e503a06e21c5
Signed-off-by: default avatarLokesh Kumar Aakulu <lkumar@codeaurora.org>
parent 24bb7c34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -498,8 +498,8 @@ enum msm_actuator_cfg_type_t {
	CFG_GET_ACTUATOR_INFO,
	CFG_SET_ACTUATOR_INFO,
	CFG_SET_DEFAULT_FOCUS,
	CFG_SET_POSITION,
	CFG_MOVE_FOCUS,
	CFG_SET_POSITION,
	CFG_ACTUATOR_POWERDOWN,
	CFG_ACTUATOR_POWERUP,
	CFG_ACTUATOR_INIT,