lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 16 Jan 2013 14:49:32 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Jiri Slaby <jslaby@...e.cz>
Cc:	lenb@...nel.org, linux-acpi@...r.kernel.org, jirislaby@...il.com,
	linux-kernel@...r.kernel.org,
	"Moore, Robert" <robert.moore@...el.com>
Subject: Re: [PATCH] ACPI: check zero length in acpi_rs_get_aml_length

Hi,

On Wednesday, January 16, 2013 12:15:28 PM Jiri Slaby wrote:
> There is a bug somewhere in the code that does not set the resource
> length. This makes the loop in acpi_rs_get_aml_length to loop forever.
> So it is a good thing to have the check even if the bug is fixed.

This needs to go through ACPICA upstream (Bob CCed).

> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> ---
>  drivers/acpi/acpica/rscalc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
> index da178b4..c128f2e 100644
> --- a/drivers/acpi/acpica/rscalc.c
> +++ b/drivers/acpi/acpica/rscalc.c
> @@ -198,7 +198,8 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
>  
>  		/* Validate the descriptor type */
>  
> -		if (resource->type > ACPI_RESOURCE_TYPE_MAX) {
> +		if (resource->type > ACPI_RESOURCE_TYPE_MAX ||
> +				WARN_ON(!resource->length)) {

So this cannot be a WARN_ON().

>  			return_ACPI_STATUS(AE_AML_INVALID_RESOURCE_TYPE);
>  		}
>  

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ