From owner-freebsd-current@FreeBSD.ORG Sat Dec 16 12:51:39 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1228E16A415; Sat, 16 Dec 2006 12:51:39 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5898843C9F; Sat, 16 Dec 2006 12:51:38 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.8/8.13.8) with ESMTP id kBGCpb4r001171; Sat, 16 Dec 2006 15:51:37 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.8/8.13.8/Submit) id kBGCpbpE001170; Sat, 16 Dec 2006 15:51:37 +0300 (MSK) (envelope-from ache) Date: Sat, 16 Dec 2006 15:51:36 +0300 From: Andrey Chernov To: Robert Watson Message-ID: <20061216125136.GA1094@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Robert Watson , current@FreeBSD.org References: <20061216055903.GA2712@nagual.pp.ru> <20061216111656.GA7501@nagual.pp.ru> <20061216112117.P72986@fledge.watson.org> <20061216114426.GA7735@nagual.pp.ru> <20061216120746.E72986@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061216120746.E72986@fledge.watson.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: current@FreeBSD.org Subject: Re: sysv_ipc.c broken in v1.30 (was Re: sysvshm appearse broken in -current) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 12:51:39 -0000 On Sat, Dec 16, 2006 at 12:11:05PM +0000, Robert Watson wrote: > > * Always permit the creator/owner to update the object > > * protections regardless of whether the object mode > > * permits it. > > */ > > if (mode & IPC_M) > > return (0); > > > >I.e. old code not even check for IPC_W or IPC_R in case of IPC_M presense. > > Is this conclusion a supposition or the result of testing? Could you test > and see if this is true? It comes just from code reading. First check for owner and next check for IPC_M bit _only_ (no other bits!) then return (0) i.e. success. > >Moreover, old code allows _anything_ for suser: > The new code should also allow anything, as long as the bits passed into > ipcperm() as requested modes are valid. There's certainly a bug here I mean anything for suser ignoring completely any modes passed. I.e. no EACCES should happen for suser in _any_ mode combination. -- http://ache.pp.ru/