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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100921124308.GC18991@one.firstfloor.org>
Date:	Tue, 21 Sep 2010 14:43:08 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Huang Ying <ying.huang@...el.com>
Cc:	Len Brown <lenb@...nel.org>, linux-kernel@...r.kernel.org,
	Andi Kleen <andi@...stfloor.org>, linux-acpi@...r.kernel.org,
	Jin Dongming <jin.dongming@...css.fujitsu.com>
Subject: Re: [PATCH 3/5] ACPI, APEI, HEST Fix the unsuitable usage of platform_data

On Sun, Sep 19, 2010 at 11:00:33AM +0800, Huang Ying wrote:
> diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
> index 343168d..1a3508a 100644
> --- a/drivers/acpi/apei/hest.c
> +++ b/drivers/acpi/apei/hest.c
> @@ -137,20 +137,23 @@ static int hest_parse_ghes_count(struct acpi_hest_header *hest_hdr, void *data)
>  
>  static int hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data)

hest_hdr is a local variable on the stack.


> +
> +	rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *));
> +	if (rc)
> +		goto err;

Now you put the address of that local variable in some global data structure.

And then you likely return and later the access accesses random stack space? 

-Andi


-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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