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: <alpine.DEB.2.21.1910161142560.2046@nanos.tec.linutronix.de>
Date:   Wed, 16 Oct 2019 11:47:03 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Paolo Bonzini <pbonzini@...hat.com>
cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        H Peter Anvin <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Radim Krcmar <rkrcmar@...hat.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Xiaoyao Li <xiaoyao.li@...el.com>,
        Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        x86 <x86@...nel.org>, kvm@...r.kernel.org
Subject: Re: [PATCH v9 09/17] x86/split_lock: Handle #AC exception for split
 lock

On Wed, 16 Oct 2019, Paolo Bonzini wrote:
> On 25/09/19 20:09, Sean Christopherson wrote:
> >   - Remove KVM loading of MSR_TEST_CTRL, i.e. KVM *never* writes the CPU's
> >     actual MSR_TEST_CTRL.  KVM still emulates MSR_TEST_CTRL so that the
> >     guest can do WRMSR and handle its own #AC faults, but KVM doesn't
> >     change the value in hardware.
> > 
> >       * Allowing guest to enable split-lock detection can induce #AC on
> >         the host after it has been explicitly turned off, e.g. the sibling
> >         hyperthread hits an #AC in the host kernel, or worse, causes a
> >         different process in the host to SIGBUS.
> > 
> >       * Allowing guest to disable split-lock detection opens up the host
> >         to DoS attacks.
> > 
> >   - KVM advertises split-lock detection to guest/userspace if and only if
> >     split_lock_detect_disabled is zero.
> > 
> >   - Add a pr_warn_once() in KVM that triggers if split locks are disabled
> >     after support has been advertised to a guest.
> > 
> > Does this sound sane?
> 
> Not really, unfortunately.  Just never advertise split-lock detection to
> guests.  If the host has enabled split-lock detection, trap #AC and
> forward it to the host handler---which would disable split lock
> detection globally and reenter the guest.

Which completely defeats the purpose.

1) Sane guest

   Guest kernel has #AC handler and you basically prevent it from detecting
   malicious user space and killing it. You also prevent #AC detection in
   the guest kernel which limits debugability.

2) Malicious guest

   Trigger #AC to disable the host detection and then carry out the DoS
   attack.

Try again.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ