Skip to content
Commit 5f4f94e9 authored by ChiYuan Huang's avatar ChiYuan Huang Committed by Lee Jones
Browse files

mfd: mt6360: Add bounds checking in Regmap read/write call-backs

Fix the potential risk of OOB read if bank index is over the maximum.

Refer to the discussion list for the experiment result on mt6370.
https://lore.kernel.org/all/20220914013345.GA5802@cyhuang-hp-elitebook-840-g3.rt/


If not to check the bound, there is the same issue on mt6360.

Cc: stable@vger.kernel.org
Fixes: 3b085044 (mfd: mt6360: Merge different sub-devices I2C read/write)
Signed-off-by: default avatarChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/1664416817-31590-1-git-send-email-u0084500@gmail.com
parent 4bef4d51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment