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: <20100113192947.GZ10295@tux1.beaverton.ibm.com>
Date:	Wed, 13 Jan 2010 11:29:47 -0800
From:	"Darrick J. Wong" <djwong@...ibm.com>
To:	Darren Jenkins <darrenrjenkins@...il.com>
Cc:	lenb@...nel.org, linux-acpi@...r.kernel.org,
	Kernel Janitors <kernel-janitors@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/acpi/power_meter.c : remove double kfree()

On Tue, Jan 12, 2010 at 11:37:07PM +1100, Darren Jenkins wrote:
> resource->domain_devices can be double kfree()'d in a couple of places.
> Fix this by setting num_domain_devices = 0 after the kfree().
> 
> Coverity CID: 13356, 13355, 13354
> 
> Signed-off-by: Darren Jenkins <darrenrjenkins@...il.com> 

Thanks for catching this.

Acked-by: Darrick J. Wong <djwong@...ibm.com>

> 
> diff --git drivers/acpi/power_meter.c drivers/acpi/power_meter.c
> index 2ef7030..18ce00a 100644
> --- drivers/acpi/power_meter.c
> +++ drivers/acpi/power_meter.c
> @@ -534,6 +534,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource)
> 
>  	kfree(resource->domain_devices);
>  	kobject_put(resource->holders_dir);
> +	resource->num_domain_devices = 0;
>  }
> 
>  static int read_domain_devices(struct acpi_power_meter_resource *resource)
> @@ -740,7 +741,6 @@ skip_unsafe_cap:
> 
>  	return res;
>  error:
> -	remove_domain_devices(resource);
>  	remove_attrs(resource);
>  	return res;
>  }
> 
> 
--
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