On Tue, Apr 30, 2002 at 11:26:43PM -0800, Ethan Benson wrote:
> > P.S.: Overall I don't think immutable/append-only are too useful because
> > attackers can always get rid of them by mknod'ing a device and writing to
> > the
> > disk directly and forcing an inode flush. So it may not be worth much
> > effort
> > for the pseudo security ones, as they only give a false sense of security.
> this is only because linux' capability system is currently broken, on
> *BSD once the secure level is raised root can no longer access raw
> devices of mounted filesystems, if you raise it to 2 then all raw disk
> devices are blocked. linux just either needs to add a capability to
> restrict access to mounted fs block devices and/or all block devices,
> or just deny access when CAP_LINUX_IMMUTABLE (or maybe CAP_SYS_RAWIO) is
It's still useless. As long as you have access to /dev/mem you can
patch kernel code which eventually leads to being able to access
raw disks (just load your own driver, not very difficult).
When you disable /dev/mem e.g. your X server stops working.
Even when you disable /dev/mem there are often other ways to access
kernel memory as root, e.g. often drivers have some mainteance ioctls
that can be used to trick some hardware into doing DMA from/to your
buffer. As soon as you can do DMA you have full access to all memory,
equivalent to /dev/mem.
There are good reasons linux never implemented the BSD security level
(it was briefly there in 2.0, but dropped because it was showed to be
useless). It's also the reason why few people use the existing linux
capabilities BTW. With some creativity most capabilities can be used
to eventually access memory or change raw disk, and that leads to
> > The only ones that may be worth it are 'S' (force O_SYNC, especially
> > for directories e.g. to handle qmail/postfix spool dirs without forcing
> > synchronous for the whole fs), 'A' (no atime) and 'd' for incremental
> > backup purposes.
> noatime is not that useful IMO, if your worried about atime updates
> there is a mount option, agreed on S(ync).
It is useful for crontab on laptops for example to prevent the disk
spinning up just for the inode flush. noatime is too big a sledgehammer.