lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 11 May 2015 15:23:08 -0600
From:	Alex Henrie <alexhenrie24@...il.com>
To:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
Cc:	Kees Cook <keescook@...omium.org>,
	"H. Peter Anvin" <hpa@...or.com>, Doug Johnson <dougvj@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Tyler Hicks <tyhicks@...onical.com>,
	Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: ioperm is preserved across fork and execve, but iopl is not

2015-05-11 15:11 GMT-06:00 One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>:
> Is there a real world use case ?

Back in 2012 I needed to make a legacy program run that accessed the
parallel port directly. Rewriting the program was not an option. So I
wrote a helper program that used iopl and execve to grant the
necessary permissions, but it only worked on 32-bit kernels. Then I
realized that I could do the same thing with ioperm, and my problem
went away, but the difference in behavior between iopl and ioperm has
bothered me ever since.

2015-05-11 14:56 GMT-06:00 H. Peter Anvin <hpa@...or.com>:
> 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().

I thought the general philosophy is that a privileged process can do
anything it wants to. Removing the ability to disable interrupts in
user space, or removing the ability to use iopl across execve, seems
contrary to that goal.

Still, if there is a security concern resulting from preserving iopl
across execve, maybe the best thing to do is leave iopl and ioperm
exactly as they are, update the documentation, and tell people to use
ioperm whenever possible.

-Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ