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: <FD045DD8-3932-4BA0-9AB9-C2405F601C45@kernel.crashing.org>
Date:	Thu, 6 Aug 2009 21:26:59 -0500
From:	Kumar Gala <galak@...nel.crashing.org>
To:	Julia Lawall <julia@...u.dk>
Cc:	benh@...nel.crashing.org, paulus@...ba.org,
	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/3] arch/powerpc: Add kmalloc NULL tests


On Aug 6, 2009, at 3:04 PM, Julia Lawall wrote:

> From: Julia Lawall <julia@...u.dk>
>
> Check that the result of kmalloc/kzalloc is not NULL before  
> dereferencing it.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression *x;
> identifier f;
> constant char *C;
> @@
>
> x = \(kmalloc\|kcalloc\|kzalloc\)(...);
> ... when != x == NULL
>    when != x != NULL
>    when != (x || ...)
> (
> kfree(x)
> |
> f(...,C,...,x,...)
> |
> *f(...,x,...)
> |
> *x->f
> )
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@...u.dk>
>
> ---
> arch/powerpc/sysdev/fsl_rio.c       |   18 ++++++++++++++----
> 1 files changed, 14 insertions(+), 4 deletions(-)


applied to next

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