From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B9FA4E50DA; Wed, 30 Sep 2026 15:35:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782528; cv=none; b=EhdaXFlIsNrNzY6WfYeX5QsY3eytEKni/bzH2SSMGlJq0k0bS/RbfYZ2OX4Qt4NA1d7z0i/i3r6oZjQJmwf1k2YBWmMinf5Hq2iOZPAAUcPEH8oUA4lC1EwBhw3ZPOn/Hfg+r2pr4SK3mD/yibMKRGMz2EotyiYob7YEvimsgOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782528; c=relaxed/simple; bh=qUUohIqo04Zr6DRMeYxaEE1SlNUEl/jCNcrCiU2O6FU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i2nwrIRSL8ZiVcEhQZvtV9mQfmPIZMQIpWqOduUvcHO+WYdrsMwVTZ7+qyBy30ReBcBCHIpGqg5zxWgGvC0XHq7iXjk74p3Wrr1OsPrWB45rrPpYuJskUerCLZDRXwAtzbpUpAsM/HPyqLiXsXYfY1tdJK6qU5azh7BqR9zuCZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nkWO5vWU; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nkWO5vWU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5855F1F000FF; Wed, 30 Sep 2026 15:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790782518; bh=sWSftq26UaA6zB0wvprlLgdBDz59IyETFKhI9zbUoOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nkWO5vWU1PsSqMVhyfM2/fR+jhLbZpYtT0kWQNVAdu0Dm7f/OcWbPOIIvEXmh4gyC oxrPY3d1DwS1Nb98s9fgAdfw43wz4jqSGRz8ksY+OxCWlPGSxC5HCOeyuQOgKlBq/K VUtODNpQuVUvSM67R6GVqUGvZCI5EUBjXb13KevY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, ikaros , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.10 076/595] ACPICA: validate handler object type in two places Date: Wed, 30 Sep 2026 17:19:29 +0200 Message-ID: <20260930152349.371908591@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152347.700140858@linuxfoundation.org> References: <20260930152347.700140858@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: ikaros [ Upstream commit c5296da2d516707862f8a2dbb4b515f777e5294f ] ACPICA: validate handler object type in acpi_ev_has_default_handler() and acpi_ev_find_region_handler(). Link: https://github.com/acpica/acpica/commit/f6fc648a1389 Signed-off-by: ikaros Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/48111441.fMDQidcC6G@rafael.j.wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpica/evhandler.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c index 3438dc187efb6..74e1d2b54017a 100644 --- a/drivers/acpi/acpica/evhandler.c +++ b/drivers/acpi/acpica/evhandler.c @@ -130,6 +130,14 @@ acpi_ev_has_default_handler(struct acpi_namespace_node *node, /* Walk the linked list of handlers for this object */ while (handler_obj) { + + /* Validate handler object type before accessing fields */ + + if (handler_obj->common.type != + ACPI_TYPE_LOCAL_ADDRESS_HANDLER) { + break; + } + if (handler_obj->address_space.space_id == space_id) { if (handler_obj->address_space.handler_flags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) { @@ -292,6 +300,9 @@ union acpi_operand_object *acpi_ev_find_region_handler(acpi_adr_space_type /* Walk the handler list for this device */ while (handler_obj) { + if (handler_obj->common.type != ACPI_TYPE_LOCAL_ADDRESS_HANDLER) { + break; + } /* Same space_id indicates a handler is installed */ -- 2.53.0