Rafael J. Wysocki 28d5387c19 ACPI: CPPC: Avoid out of bounds access when parsing _CPC data
commit 40d8abf364bcab23bc715a9221a3c8623956257b upstream.

If the NumEntries field in the _CPC return package is less than 2, do
not attempt to access the "Revision" element of that package, because
it may not be present then.

Fixes: 337aadff8e45 ("ACPI: Introduce CPU performance controls using CPPC")
BugLink: https://lore.kernel.org/lkml/20220322143534.GC32582@xsang-OptiPlex-9020/
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-15 14:14:59 +02:00
..
2019-05-14 19:17:53 +02:00
2018-06-05 10:08:27 -07:00
2020-11-22 10:02:26 +01:00
2019-12-17 20:35:05 +01:00
2018-05-02 13:01:08 +02:00
2020-06-30 23:17:15 -04:00