]> git.itanic.dy.fi Git - linux-stable/commit
firmware: arm_scmi: Harden accesses to the reset domains
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 17 Aug 2022 17:27:29 +0000 (18:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:11:45 +0000 (11:11 +0200)
commit1f08a1b26cfc53b7715abc46857c6023bb1b87de
tree952b184caf7e592f1c969bf62a36f6882af11aa2
parent9ec5a534d77c340387af485b311b39d7a186b105
firmware: arm_scmi: Harden accesses to the reset domains

[ Upstream commit e9076ffbcaed5da6c182b144ef9f6e24554af268 ]

Accessing reset domains descriptors by the index upon the SCMI drivers
requests through the SCMI reset 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-5-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Stable-dep-of: b75c83d9b961 ("firmware: arm_scmi: Fix the asynchronous reset requests")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/arm_scmi/reset.c