]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI: MRRM: Check revision of MRRM table
authorTony Luck <tony.luck@intel.com>
Wed, 22 Oct 2025 20:45:23 +0000 (13:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:36:41 +0000 (15:36 -0500)
[ Upstream commit dc131bcd8d9219f7da533918abcb0d32951b7702 ]

Before trying to parse the MRRM table, check that the table revision
is the one that is expected.

Fixes: b9020bdb9f76 ("ACPI: MRRM: Minimal parse of ACPI MRRM table")
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20251022204523.10752-1-tony.luck@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/acpi_mrrm.c

index 47ea3ccc2142496a69a10b727afc3ae88bf4a2d8..a6dbf623e5571fa9c8b45f9cb5c47b328a31ed48 100644 (file)
@@ -63,6 +63,9 @@ static __init int acpi_parse_mrrm(struct acpi_table_header *table)
        if (!mrrm)
                return -ENODEV;
 
+       if (mrrm->header.revision != 1)
+               return -EINVAL;
+
        if (mrrm->flags & ACPI_MRRM_FLAGS_REGION_ASSIGNMENT_OS)
                return -EOPNOTSUPP;