]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPICA: Refuse to evaluate a method if arguments are missing
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Jun 2025 12:17:45 +0000 (14:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 14:03:17 +0000 (16:03 +0200)
commitd547779e72cea9865b732cd45393c4cd02b3598e
tree6637ab31e2801afa42eecb5d2dd9f53c23d22fe0
parent347827bd0c5680dac2dd59674616840c4d5154f1
ACPICA: Refuse to evaluate a method if arguments are missing

[ Upstream commit 6fcab2791543924d438e7fa49276d0998b0a069f ]

As reported in [1], a platform firmware update that increased the number
of method parameters and forgot to update a least one of its callers,
caused ACPICA to crash due to use-after-free.

Since this a result of a clear AML issue that arguably cannot be fixed
up by the interpreter (it cannot produce missing data out of thin air),
address it by making ACPICA refuse to evaluate a method if the caller
attempts to pass fewer arguments than expected to it.

Closes: https://github.com/acpica/acpica/issues/1027 [1]
Reported-by: Peter Williams <peter@newton.cx>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Tested-by: Hans de Goede <hansg@kernel.org> # Dell XPS 9640 with BIOS 1.12.0
Link: https://patch.msgid.link/5909446.DvuYhMxLoT@rjwysocki.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/acpica/dsmethod.c