]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firmware: arm_scmi: Harden accesses to the sensor domains
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 17 Aug 2022 17:27:28 +0000 (18:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Oct 2022 07:51:23 +0000 (09:51 +0200)
commit8e880f30946fd4d8a864defeeada8a9a5b48848a
tree15a7eccefdcf3c8b7283b93874cea7954f9654d3
parent41bf1b0ad95395ec6d5172fb58540323788d9397
firmware: arm_scmi: Harden accesses to the sensor domains

[ Upstream commit 76f89c954788763db575fb512a40bd483864f1e9 ]

Accessing sensor domains descriptors by the index upon the SCMI drivers
requests through the SCMI sensor operations interface can potentially
lead to out-of-bound violations if the SCMI driver misbehave.

Add an internal consistency check before any such domains descriptors
accesses.

Link: https://lore.kernel.org/r/20220817172731.1185305-4-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/arm_scmi/sensors.c