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: <Pine.LNX.4.64.0703230811430.21857@schroedinger.engr.sgi.com>
Date:	Fri, 23 Mar 2007 08:12:39 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Stephane Eranian <eranian@....hp.com>
cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org, ak@...e.de
Subject: Re: kmalloc() with size zero

On Thu, 22 Mar 2007, Stephane Eranian wrote:

> I ran into an issue with perfmon where I ended up calling
> kmalloc() with a size of zero. To my surprise, this did
> not return NULL but a valid data address.
> 
> I am wondering if this is a property of kmalloc() or simply
> a bug. It is the case that the __kmalloc() code does not
> check for zero size.

Correct SLAB will give you the smallest possible allocation. I'd say these 
calls should be fixed. SLUB does check for zero and will throw a stack 
dump.

-
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