Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933148Ab1FACC7 (ORCPT ); Tue, 31 May 2011 22:02:59 -0400 Received: from smtp.outflux.net ([198.145.64.163]:52334 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933030Ab1FACC5 (ORCPT ); Tue, 31 May 2011 22:02:57 -0400 Date: Tue, 31 May 2011 19:02:54 -0700 From: Kees Cook To: James Morris Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] AppArmor: fix oops in apparmor_setprocattr Message-ID: <20110601020254.GT19633@outflux.net> References: <20110531183141.GH19633@outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Canonical X-HELO: www.outflux.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1031 Lines: 31 Hi James, On Wed, Jun 01, 2011 at 10:25:37AM +1000, James Morris wrote: > On Tue, 31 May 2011, Kees Cook wrote: > > When invalid parameters are passed to apparmor_setprocattr a NULL deref > > oops occurs when it tries to record an audit message. This is because > > it is passing NULL for the profile parameter for aa_audit. But aa_audit > > now requires that the profile passed is not NULL. > > > > Fix this by passing the current profile on the task that is trying to > > setprocattr. > > Is this trigger able by unprivileged users? Yes, but the Oops kills the process doing the write as it triggers the BUG_ON, not the process being written to. > >From which upstream commit is this an issue? b5e95b48685e3481139a5634d14d630d12c7d5ce -Kees -- Kees Cook Ubuntu Security Team -- 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/