From owner-freebsd-security@FreeBSD.ORG Mon Dec 11 20:24:50 2006 Return-Path: X-Original-To: freebsd-security@freebsd.org Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C81D116A416; Mon, 11 Dec 2006 20:24:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3120B43D77; Mon, 11 Dec 2006 19:51:51 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id DC12446E0F; Mon, 11 Dec 2006 14:53:08 -0500 (EST) Date: Mon, 11 Dec 2006 19:53:08 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Craig Edwards In-Reply-To: <4577076A.6080508@winbot.co.uk> Message-ID: <20061211193712.U4227@fledge.watson.org> References: <200612060933.kB69XErN083086@freefall.freebsd.org> <45769654.5050307@freebsd.org> <4576F3A9.9000307@obluda.cz> <4577076A.6080508@winbot.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dan Lukes , freebsd-security@freebsd.org, Colin Percival Subject: Re: FreeBSD Security Advisory FreeBSD-SA-06:25.kmem X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 20:24:50 -0000 On Wed, 6 Dec 2006, Craig Edwards wrote: > Doesn't securelevel completely mitigate this even for root users anyway, if > set? Setting securelevel denies raw access to disk devices and kmem in this > way does it not? Securelevel is intended to protect integrity and not confidentiality, so does not prevent reading, not writing, so is unrelated to this specific issue. I come out generally against releasing an advisory for this issue. In the current security model, members of the operator group have a high level of privilege in the system, as they can: - Read from partitions used for file system storage, including delete and unallocated space. - Read from swap partitions, allowing access to both kernel dumps and paged out process data. Since they can generally force paging on systems with swap, this effectively means read access to most process memory, as well as the pageable memory associated with kernel pipe IPC. - Directly interface with the many controllers and other devices via device drivers granting read or write access to the operator group. I think releasing a security advisory for this problem offers a false promise: we don't promise to protect kernel data or the kernel from the operator user, and releasing an advisory suggests we do. I think it's very likely that other device drivers On the other hand, I think we should be thinking about replacements for our current notion of an operator group. For example, should we have shutdown/dump/etc be setgid operator for access to disk, but authorize use based on membership of another group, which would avoid granting device I/O privileges to members of this new operator group? Likewise, the right to shutdown a system should not necessarily correspond with the right to back up any mounted file system. Thoughts on the best thing to do here would be most welcome. Mac OS X, for example, has a notion of a user space policy file in /etc that is checked by various setuid/setgid tools to see whether the invoking user has a specific high level privilege. The distinction between high level and low level there, btw, is that a low level privilege is the privilege as represented with respect to the kernel (reboot, read raw disk, etc) and the high level privilege is the use of privilege provided and interpretted by a privilege-elevated (setuid/setgid) program (the right to shutdown, the right to back up, etc). Obviously, the program implementing the service has to have significant low level privilege, but it also gates rights due to its interpretation of a higher level notion of privilege and authorization. Robert N M Watson Computer Laboratory University of Cambridge