mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 13:23:02 -04:00
ACPICA: Add validation for node in acpi_ns_build_normalized_path()
Add validation for node in acpi_ns_build_normalized_path() to prevent use-after-free vulnerabilities. Link: https://github.com/acpica/acpica/commit/b35adf49e89a Signed-off-by: ikaros <void0red@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/118666237.nniJfEyVGO@rafael.j.wysocki
This commit is contained in:
committed by
Rafael J. Wysocki
parent
c5296da2d5
commit
96b2b61687
@@ -222,6 +222,12 @@ acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
|
||||
goto build_trailing_null;
|
||||
}
|
||||
|
||||
/* Validate the Node to avoid use-after-free vulnerabilities */
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) {
|
||||
goto build_trailing_null;
|
||||
}
|
||||
|
||||
next_node = node;
|
||||
while (next_node && next_node != acpi_gbl_root_node) {
|
||||
if (next_node != node) {
|
||||
|
||||
Reference in New Issue
Block a user