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: <radix-insert-can-fail-reply1@mdm.bga.com>
Date:	Wed, 25 May 2011 05:48:11 -0500
From:	Milton Miller <miltonm@....com>
To:	Thomas Gleixner <tglx@...utronix.de>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] irq: radix_tree_insert can fail

On Wed, 25 May 2011 about 10:18:40 +0200 (CEST), Thomas Gleixner wrote:
> On Wed, 25 May 2011, Milton Miller wrote:
> 
> > Check the insert, and if it fails cleanup and free all partial work.
> > 
> > Sparse irq was not checking the return code from radix_tree_insert,
> > but it may need to allocate memory and can fail.  If it failed,
> > it still claimed success to the caller but the affected irq(s) are
> > unavailable and the reference to the affected descriptors is leaked.
> > 
> > Signed-off-by: Milton Miller <miltonm@....com>
> > ---
> > I started by tring to change free_desc to take the descriptor pointer
> > and pushing that down, but that soon ran into conflicts between the
> > array and sparse implementations, and/or the old dynamic irq cleanup
> > function that is still used by some architectures.  This version is
> > targeted, and also protects against scribbles to irq_data.irq.
> 
> The simpler solution is to move irq_insert_desc() into alloc_desc()
> and deal with the error case there.

And I see that this one too as written does not compile, due to
my faulty config testing.  I'll explore your idea tomorrow after
some sleep, but it makes sense.

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