Coda File System

Re: the purpose of RealmId?

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Tue, 5 Aug 2014 07:43:26 -0400
On Tue, Aug 05, 2014 at 01:20:45PM +0200, u-codalist-z149_at_aetey.se wrote:
> My impression is that the RealmId item (being passed around as a reference
> to a realm and also for building inode numbers in dir_DirEntry2VDirent()
> in coda-src/dir/dirbody.c) could be replaced by a direct use of the
> pointer to the realm object.

NO. Do NOT do that. For one you are giving potential (local) attackers
very useful information where datastructures are located in the Venus
process. Aside from that, RealmID is only 32-bits and when you are on a
64-bit system, that uniqueness is no longer guaranteed.

Finally the way realms, volumes, vnodes, and uniquifiers interact is
very important to avoid inode collision on systems that do not have
iget4 at the kernel level and have to hash the 128-bit Coda identifier
to 32 or 64-bit inode number.

Jan
Received on 2014-08-05 07:43:31