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, 21 Jan 2015 11:25:23 -0500
From:	Tejun Heo <tj@...nel.org>
To:	Thierry Reding <treding@...dia.com>
Cc:	Paul Walmsley <paul@...an.com>, gregory.clement@...e-electrons.com,
	hdegoede@...hat.com, pwalmsley@...dia.com,
	linux-tegra@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, linux-next@...r.kernel.org,
	linux-ide@...r.kernel.org
Subject: Re: next-20150120 broken on Tegra by "ata: libahci: Allow using
 multiple regulators"

On Wed, Jan 21, 2015 at 04:55:21PM +0100, Thierry Reding wrote:
> From a4f78e3ec05f1b2ad86aa44d6bd5394d75a23a06 Mon Sep 17 00:00:00 2001
> From: Thierry Reding <treding@...dia.com>
> Date: Wed, 21 Jan 2015 11:50:52 +0100
> Subject: [PATCH] ata: libahci: Fix devres cleanup on failure
> 
> Commit c7d7ddee7e24 ("ata: libahci: Allow using multiple regulators")
> releases regulators during ahci_platform_put_resources(). That doesn't
> work because the function is run as part of the devres machinery. Such
> resources are torn down in reverse order. Since the array that holds
> pointers to the regulators is allocated using devres after the device
> context to which ahci_platform_put_resources() is attached, the memory
> will be freed before calling ahci_platform_put_resources() and thereby
> causing a use-after-free error.
> 
> This commit fixes this by using regular allocations for the array. The
> memory can then be freed after the regulators have been released. This
> conserves the advantages of using the managed API.
> 
> Reported-by: Paul Walmsley <paul@...an.com>
> Signed-off-by: Thierry Reding <treding@...dia.com>

Applied to libata/for-3.20.

Thanks.

-- 
tejun
--
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