mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02: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:
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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user