Re: [PATCH] media: atomisp: avoid ACPI package count underflow in gmin_cfg_get_dsm

From: Jose A. Perez de Azpillaga

Date: Fri Apr 10 2026 - 05:23:59 EST


On Fri, Apr 10, 2026 at 12:41:58AM +0300, Mohamed El Harake wrote:
> From: Mohamad El Harake <mohamedharake2006@xxxxxxxxx>
>
> gmin_cfg_get_dsm() iterates over ACPI _DSM package elements as
> key/value pairs using obj->package.count - 1 as the loop bound.
>
> If package.count is 0, the subtraction underflows and may lead
> to out-of-bounds access.
>
> Use i + 1 < obj->package.count instead.

how was this bug tested? and is there any way to reproduce this?

--
regards,
jose a. p-a