Messages in this thread | | | Date | Mon, 11 May 2015 13:56:34 -0700 | From | "H. Peter Anvin" <> | Subject | Re: Fwd: ioperm is preserved across fork and execve, but iopl is not |
| |
On 05/11/2015 01:49 PM, Alex Henrie wrote: > > The ioperm and iopl calls are both used to grant a process permission > to access I/O devices directly. iopl(3) is equivalent to ioperm(0, > 0xFFFF, 1). However, permissions granted through ioperm are preserved > across fork and execve, and permissions granted through iopl are not. > This makes no sense: The two calls do the same thing, so there is no > security benefit to dropping one on fork or execve but not the other. >
They don't, in fact. An iopl(3) process is allowed to disable interrupts in user space, which an ioperm() process is not.
This is a HUGE deal. This really makes me wonder if iopl(3) should be allowed at all, or if we should just intercept it and treat it as ioperm().
-hpa
| |