]> 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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Oct 2025 19:35:35 +0000 (20:35 +0100)
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>
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;