From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754785AbbGYGpQ (ORCPT ); Sat, 25 Jul 2015 02:45:16 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:36401 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513AbbGYGpO (ORCPT ); Sat, 25 Jul 2015 02:45:14 -0400 MIME-Version: 1.0 In-Reply-To: <20150725062343.GA3902@1wt.eu> References: <7286d77aa81abc38dc40362e2439861427064f6f.1437802102.git.luto@kernel.org> <20150725062343.GA3902@1wt.eu> From: Andy Lutomirski Date: Fri, 24 Jul 2015 23:44:52 -0700 Message-ID: Subject: Re: [PATCH v4 2/3] x86/ldt: Make modify_ldt optional To: Willy Tarreau Cc: Andy Lutomirski , Peter Zijlstra , Steven Rostedt , "security@kernel.org" , X86 ML , Borislav Petkov , Sasha Levin , "linux-kernel@vger.kernel.org" , Konrad Rzeszutek Wilk , Boris Ostrovsky , Andrew Cooper , Jan Beulich , xen-devel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2015 at 11:23 PM, Willy Tarreau wrote: > On Fri, Jul 24, 2015 at 10:36:45PM -0700, Andy Lutomirski wrote: >> The modify_ldt syscall exposes a large attack surface and is >> unnecessary for modern userspace. Make it optional. > > Andy, you didn't respond whether you think it wouldn't be better to make > it runtime-configurable instead. The goal here is to ensure distros > ship with modify_ldt disabled by default. But if it means breaking > compatibility with (rare) existing applications, I'm seeing a risk > that they'll ship with it enabled instead, which would make the config > option useless. The CONFIG_DEFAULT_MMAP_ADDR was a good example of > successful deployment of a hardening measure that has been widely > adopted despite its (low) risk of breakage in field because it was > adjustable in field. I'm all for it, but I think it should be hard-disablable in config, too, for the -tiny people. If we add a runtime disable, let's do a separate patch, and you and Kees can fight over how general it should be. > > That's why here I think we should do the same, and possibly even > emit a warning once to report the first user of modify_ldt if that > can help. > > What do you think ? I'm generally in favor. On the other hand, the current series is already written, might even be compatible with Xen, and patch 1 at least fixes a real bug. Maybe several real bugs. --Andy