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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191126113628.GD31379@zn.tnic>
Date:   Tue, 26 Nov 2019 12:36:28 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     x86-ml <x86@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] x86: Filter MSR writes from luserspace

On Tue, Nov 26, 2019 at 12:22:34PM +0100, Borislav Petkov wrote:
> Hi,
> 
> so this has been on my TODO list for a while. I'd like to disable writes
> to certain MSRs and MSR ranges because luserspace has no job poking at
> those at all. If there's a need for poking at MSRs, a proper userspace
> interface needs to be designed instead of plain writes into the MSRs.
> 
> There's a "msr.allow_writes" root-only param for the use case where CPU
> folks want to be poking at MSRs. And yes, that is a valid use case -
> they wanna be poking at their MSRs.
> 
> In any case, writes do taint the kernel now so that it is known that
> something has been poking at the MSRs.
> 
> Thoughts?
> 
> ---
> 
> ... to certain important MSRs.
> 
> v0: add allow_writes param for root.
> 
> Not-yet-signed-off-by: Borislav Petkov <bp@...e.de>
> ---
>  arch/x86/events/amd/power.c      |   4 -
>  arch/x86/events/intel/knc.c      |   4 -
>  arch/x86/include/asm/msr-index.h |   8 ++
>  arch/x86/include/asm/processor.h |   2 +
>  arch/x86/kernel/cpu/bugs.c       |   2 +-
>  arch/x86/kernel/cpu/common.c     | 165 +++++++++++++++++++++++++++++++
>  arch/x86/kernel/msr.c            |  20 +++-
>  drivers/hwmon/fam15h_power.c     |   4 -
>  8 files changed, 195 insertions(+), 14 deletions(-)

Note to self for next version:

- turn the list into a whitelist of MSRs instead, for obvious reasons (Ingo).

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ