Re: RFC: Tainting the kernel on raw I/O access

From: Austin S Hemmelgarn
Date: Thu Sep 04 2014 - 10:11:04 EST


On 2014-09-03 19:46, Andi Kleen wrote:
> "H. Peter Anvin" <h.peter.anvin@xxxxxxxxx> writes:
>
>> In a meeting earlier today, we discussed MSR access and that it could be
>> used to do bad things. The same applies to other forms of raw I/O
>> (/dev/mem, /dev/port, ioperm, iopl, etc.)
>
> I don't think it makes sense to use the taint flags as a security
> mechanism. They would be a very poor (and likely by itself insecure) one.
>
> As for the original purpose of taints, I'm not aware of any
> problems with MSR access or port IO causing excessive
> kernel oops reports. Are you?
Really? Either one can be used to modify the running kernel (or
microcode), and possibly even destroy hardware. Even if it doesn't
cause an OOPS or panic, that sounds like something that we should at
least taint on.
> If there are none I don't think it makes sense.
>
> At least personally I use MSR accesses quite frequently
> for benign purposes.
But how much of that is just reading MSR's, and of the writes, how much
are either debugging or things that the average user isn't ever going to do?

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature