Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935872AbXHOWPB (ORCPT ); Wed, 15 Aug 2007 18:15:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758790AbXHOWOf (ORCPT ); Wed, 15 Aug 2007 18:14:35 -0400 Received: from namei.org ([69.55.235.186]:38427 "EHLO us.intercode.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756323AbXHOWOd (ORCPT ); Wed, 15 Aug 2007 18:14:33 -0400 Date: Wed, 15 Aug 2007 15:13:55 -0700 (PDT) From: James Morris X-X-Sender: jmorris@us.intercode.com.au To: linux-kernel@vger.kernel.org cc: mm-commits@vger.kernel.org, Alan Cox , alan@redhat.com, jmorris@redhat.com, ranma+kernel@tdiedrich.de, wfg@mail.ustc.edu.cn, Stephen Smalley , Eric Paris Subject: Re: + fix-null-pointer-dereference-in-__vm_enough_memory.patch added to -mm tree In-Reply-To: <200708152048.l7FKm0V5014219@imap1.linux-foundation.org> Message-ID: References: <200708152048.l7FKm0V5014219@imap1.linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1327 Lines: 35 On Wed, 15 Aug 2007, akpm@linux-foundation.org wrote: > ------------------------------------------------------ > Subject: fix NULL pointer dereference in __vm_enough_memory() > From: Alan Cox > > The new exec code inserts an accounted vma into an mm struct which is not > current->mm. The existing memory check code has a hard coded assumption > that this does not happen as does the security code. > > As the correct mm is known we pass the mm to the security method and the > helper function. A new security test is added for the case where we need > to pass the mm and the existing one is modified to pass current->mm to > avoid the need to change large amounts of code. > > (Thanks to Tobias for fixing rejects and testing) > > Signed-off-by: Alan Cox > Cc: WU Fengguang > Cc: James Morris > Cc: Tobias Diedrich > Signed-off-by: Andrew Morton Acked-by: James Morris -- James Morris - 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/