mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 09:20:13 -04:00
arm_mpam: Disable driver unbind to avoid UAF
When a user unbinds an MSC and that MSC is the only MSC left for a
component then the corresponding mpam_component will be freed. If the user
then goes on to read the schemata file in the resctrl filesystem then the
mpam_component will be accessed from resctrl_arch_get_config() leading to a
use after free.
As the MPAM driver is not a module the unbind sysfs interface is the only
way to trigger the remove. Instead of dealing with the complexity of
allowing some unused MSC to unbind just remove the unbind sysfs interface.
Fixes: f04046f257 ("arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
@@ -2133,6 +2133,7 @@ static int mpam_msc_drv_probe(struct platform_device *pdev)
|
||||
static struct platform_driver mpam_msc_driver = {
|
||||
.driver = {
|
||||
.name = "mpam_msc",
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
.probe = mpam_msc_drv_probe,
|
||||
.remove = mpam_msc_drv_remove,
|
||||
|
||||
Reference in New Issue
Block a user