ACK: [PATCH] acpica: nspredef: fix null pointer dereference issue (LP: #1195251)

Alex Hung alex.hung at canonical.com
Fri Jun 28 03:34:23 UTC 2013


On 06/27/2013 06:55 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> I found that a _WAK that does not return a package trips a null
> pointer reference.  Check for a null pointer before the
> dereferencing of *ReturnObjectPtr.   This is a hot fix workaround,
> we should pick up the official fix in later version of ACPICA.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpica/source/components/namespace/nspredef.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c
> index 941c3bd..e7bc55b 100644
> --- a/src/acpica/source/components/namespace/nspredef.c
> +++ b/src/acpica/source/components/namespace/nspredef.c
> @@ -237,6 +237,11 @@ AcpiNsCheckReturnValue (
>          goto Exit;
>      }
>  
> +    if (!(*ReturnObjectPtr))
> +    {
> +        Status = AE_AML_NO_RETURN_VALUE;
> +        goto Exit;
> +    }
>      /*
>       * For returned Package objects, check the type of all sub-objects.
>       * Note: Package may have been newly created by call above.
> 
Acked-by: Alex Hung <alex.hung at canonical.com>

-- 
Cheers,
Alex Hung



More information about the fwts-devel mailing list