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-next>] [day] [month] [year] [list]
Date:	Tue, 16 Apr 2013 08:17:11 +0000
From:	"Wang, Rui Y" <rui.y.wang@...el.com>
To:	"isimatu.yasuaki@...fujitsu.com" <isimatu.yasuaki@...fujitsu.com>
CC:	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rientjes@...gle.com" <rientjes@...gle.com>,
	"linuxram@...ibm.com" <linuxram@...ibm.com>,
	"toshi.kani@...com" <toshi.kani@...com>
Subject: RE: [Bug fix PATCH] resource: Reusing a resource structure
 allocated by bootmem

> -----Original Message-----
> From: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
> Date: Mon, 15 Apr 2013 11:15:28 +0900
> Subject: [Bug fix PATCH] resource: Reusing a resource structure allocated by
> bootmem
> To: akpm@...ux-foundation.org
> Cc: linux-kernel@...r.kernel.org, rientjes@...gle.com, linuxram@...ibm.com,
> toshi.kani@...com, Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
> <<...>>
> +	if (bootmem_resource.sibling) {
> +		spin_lock(&bootmem_resource_lock);
> +		res = bootmem_resource.sibling;
> +		bootmem_resource.sibling = res->sibling;
> +		spin_unlock(&bootmem_resource_lock);
> +		memset(res, 0, sizeof(struct resource));
> +	} else {
> +		res = kzalloc(sizeof(struct resource), flags);
> +	}

bootmem_resource_lock does not protect the if() statement from accessing bootmem_resource.sibling.

spin_lock(&bootmem_resource_lock);
if (bootmem_resource.sibling) {
...

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