Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754120AbYJ2PtT (ORCPT ); Wed, 29 Oct 2008 11:49:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752923AbYJ2PtK (ORCPT ); Wed, 29 Oct 2008 11:49:10 -0400 Received: from casper.infradead.org ([85.118.1.10]:50556 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbYJ2PtJ (ORCPT ); Wed, 29 Oct 2008 11:49:09 -0400 Date: Wed, 29 Oct 2008 08:49:32 -0700 From: Arjan van de Ven To: Eric Paris Cc: linux-kernel@vger.kernel.org, morgan@kernel.org, serue@us.ibm.com Subject: Re: [PATCH] Capabilities: BUG when an invalid capability is requested Message-ID: <20081029084932.77de26fd@infradead.org> In-Reply-To: <1225294932.23736.28.camel@localhost.localdomain> References: <1225294932.23736.28.camel@localhost.localdomain> Organization: Intel X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1233 Lines: 26 On Wed, 29 Oct 2008 11:42:12 -0400 Eric Paris wrote: > If an invalid (large) capability is requested the capabilities system > may panic as it is dereferencing an array of fixed (short) length. > Its possible (and actually often happens) that the capability system > accidentally stumbled into a valid memory region but it also regularly > happens that it hits invalid memory and BUGs. If such an operation > does get past cap_capable then the selinux system is sure to have > problems as it already does a (simple) validity check and BUG. This > is known to happen by the broken and buggy firegl driver. > > This patch cleanly checks all capable calls and BUG if a call is for > an invalid capability. This will likely break the firegl driver for > some situations, but it is the right thing to do. Garbage into a > security system gets you killed/bugged > > Signed-off-by: Eric Paris > Acked-by: Arjan van de Ven -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/