[PATCH v1 2/2] arm_mpam: Disable driver unbind to avoid UAF
Ben Horgan
ben.horgan at arm.com
Thu Aug 6 07:46:31 PDT 2026
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: f04046f2577a ("arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate")
Signed-off-by: Ben Horgan <ben.horgan at arm.com>
---
drivers/resctrl/mpam_devices.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c
index bc6cc0b5c96b..e888de8d4896 100644
--- a/drivers/resctrl/mpam_devices.c
+++ b/drivers/resctrl/mpam_devices.c
@@ -2141,6 +2141,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,
--
2.43.0
More information about the linux-arm-kernel
mailing list