Subject: Re: new kpi proposal, sysdisk(9)
To: Jason Thorpe <thorpej@shagadelic.org>
From: David Laight <david@l8s.co.uk>
List: tech-security
Date: 01/02/2007 23:06:39
On Tue, Jan 02, 2007 at 02:53:41PM -0800, Jason Thorpe wrote:
> 
> On Dec 30, 2006, at 10:35 AM, Bill Studenmund wrote:
> 
> >I want conceptual support for overlapping wedges mainly for how MBR  
> >disks
> >get partitioned. I'd like a wedge for an extended partition, and a  
> >wedge
> >for the file system there-in and a wedge for the extended partition  
> >in the
> >extended partition and a wedge for the file system in that and so  
> >on. I'd
> >like the non-file-system ones as they are what the partitioning  
> >tools work
> >with.
> 
> I specifically do not want a wedge for an MBR extended partition with  
> sub-wedges for each nested MBR table.  I view an MBR table "tree" as a  
> being a single partition table, conceptually.

The MBR extended partition is a linked list, not a tree, and is (IMHO as
well) treated if it were just a method of splitting a large chunk of
disk into pieces.

However I think you need to worry about restricting write access to
ranges of disk blocks, and not to partitions (maybe unless the secure
level has been raised).  In particular:

1) You need to be able to read and write boot information from 'partitions'
   that have mounted filesystems, and (probably) be directly accesing the
   relevant offsets from the 'entire disk' device.
   (This means that a ufs mount must release the first 8k...)

2) You needs to be able to dump directly into disk space occupied by the
   'swap' partition of a raid volume.

You also don't want to be able to move the base sector of a mounted filesystem!
(I've managed that one!) Nor be able (easily) to write to the disk area
underlying a mounted filesystem.

	David

-- 
David Laight: david@l8s.co.uk