Re: Security Hole?

sct@dcs.ed.ac.uk
Mon, 4 Mar 96 23:00 GMT


Hi,

On Sun, 3 Mar 1996 16:03:43 -0500 (EST), Andrew Mileski
<dmtech@magi.com> said:

> Wanted to get some EXPERT opinion on this...
> I've noticed that the linux kernel allows anyone to freely
> request/release IRQ, DMA, and I/O. Is this a security
> hole, or am I missing something that only allows root to
> do these things?

Err, I think you've missed the point. *No* user can arbitrarily
request allocation of these resources --- only kernel code can.
However, it is perfectly legitimate for the kernel to do so on behalf
of *any* user, not just root. For example, opening /dev/fd0 will
cause the kernel to reserve the floppy interface's IO space, DMA
channel and IRQ line, and it is quite proper for any user to do this.

The point is that the kernel will only request allocation of IO
resources if the user process has got access to the character or block
device already, so the permissions in /dev/ are enforced right down to
IO space automatically.

Cheers,
Stephen.

--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.