]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: sysfs: validate return type of _STR method
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 9 Jul 2024 20:37:24 +0000 (22:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:13 +0000 (15:11 +0200)
commit0cdfb9178a3bba843c95c2117c82c15f1a64b9ce
tree4fcf3ce68d2709245ab8545807cdcee20ce5436d
parent90ed958acfd19e459769702e9109aca6dac2e748
ACPI: sysfs: validate return type of _STR method

commit 4bb1e7d027413835b086aed35bc3f0713bc0f72b upstream.

Only buffer objects are valid return values of _STR.

If something else is returned description_show() will access invalid
memory.

Fixes: d1efe3c324ea ("ACPI: Add new sysfs interface to export device description")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-1-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/device_sysfs.c