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: <20110211092515.GA29583@secunet.com>
Date:	Fri, 11 Feb 2011 10:25:15 +0100
From:	Steffen Klassert <steffen.klassert@...unet.com>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Eric Paris <eparis@...hat.com>, linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org
Subject: Re: [PATCH v2] flex_array: Change behaviour on zero size
 allocations

On Tue, Feb 08, 2011 at 09:02:41AM -0800, Dave Hansen wrote:
> 
> The rest of this patch looks good.  When you resend, you need to break
> this up in to at least two patches: one to change 'end' to
> 'nr_elements' (or something else) and the one to handle zero-sized
> elements and arrays.

Ok.

> 
> I also think we need to remove the ability to do zero-sized elements.
> Unless there's some new code that I'm missing, I don't see any of the
> existing security policy code which would be able to do that.
> 

Well, from the selinux policy point of view we don't need the ability
to handle zero-sized elements. But why you want to remove it? I don't
see a reason why zero-sized elements should be handled different form
zero number of elements. This could again produce a pitfall for potential
new flex_array users.

Anyway, for the moment I'm just interested to load my selinux policy.
So we could return -EINVAL is somebody tries to allocate with element
size zero if you think it should be like that.

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