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]
Message-Id: <201003132105.CDF15561.OVOFHStLJFFQMO@I-love.SAKURA.ne.jp>
Date:	Sat, 13 Mar 2010 21:05:13 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	error27@...il.com, jmorris@...ei.org
Cc:	takedakn@...data.co.jp, serue@...ibm.com, haradats@...data.co.jp,
	linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] tomoyo: fix potential use after free

Dan Carpenter wrote:

> The original code returns a freed pointer.  This function is expected to 
> return NULL on errors.
> 
> Signed-off-by: Dan Carpenter <error27@...il.com>

Oh, thank you.
James, please send this patch to 2.6.34-rc1 .

Acked-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>

> diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
> index ff51f10..ef89947 100644
> --- a/security/tomoyo/common.c
> +++ b/security/tomoyo/common.c
> @@ -886,6 +886,7 @@ static struct tomoyo_profile *tomoyo_find_or_assign_new_profile(const unsigned
>  	ptr = kmalloc(sizeof(*ptr), GFP_KERNEL);
>  	if (!tomoyo_memory_ok(ptr)) {
>  		kfree(ptr);
> +		ptr = NULL;
>  		goto ok;
>  	}
>  	for (i = 0; i < TOMOYO_MAX_CONTROL_INDEX; i++)
--
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