Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1192395

Re: [PATCH v4 2/3] x86/ldt: Make modify_ldt optional

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/3] x86/ldt: Make modify_ldt optional
Date Sat, 25 Jul 2015 18:10:01 +0200
Message-ID <pQabn-YF-3@gated-at.bofh.it> (permalink)
References <pQ0lH-3FD-3@gated-at.bofh.it> <pQ0lH-3FD-1@gated-at.bofh.it> <pQ3MC-bU-17@gated-at.bofh.it>
X-Original-To Borislav Petkov <bp@alien8.de>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=IIg/CcqFoUS8+k+dWDq0a3h1myZ2u3UzGBiQn+SHvG4=; b=BHi0usQPdmsozjvpo8+WJaG2uETuM2a+0E53DckDUZtN8eEqI9fqjBTMjEN8Nfc9hW s9xlHhnmFNojQF6t3BD32jh4OZBhl9YNK44KoCJJHxG3Z0Glqss0Tj/ODz4oEPuaDmTh nX6+Vg2cqAd8OZoe9bOBdffOlh5DX77ZCrV0Cj8+8YEWPy76sOfXnDJfRJ29NgNtjZed 9F90WQ/nSZOU7639Ch/Dd7HQzNi4SAM/GcWYlwbCTG8sfIv/4yu9StZoTfikJJp9GLfI gHVb2tHUzLXBE+XT0GcqkwhvfHsbUxQ3bAL8lwxUCp/1grMKesXYOhRmHBTkQV2XX24e OFIA==
X-Gm-Message-State ALoCoQmdUQ3NCfnRpzhTzAP1M4Hcz4IihTDkdP+fLxHYA7YwLQWwE0Gs6VW3LWDE1uXlg5R0IaJQ
X-Received by 10.112.35.229 with SMTP id l5mr19365929lbj.0.1437840254490; Sat, 25 Jul 2015 09:04:14 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 58
Organization linux.* mail to news gateway
X-Original-Cc Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Steven Rostedt <rostedt@goodmis.org>, "security@kernel.org" <security@kernel.org>, X86 ML <x86@kernel.org>, Sasha Levin <sasha.levin@oracle.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Jan Beulich <jbeulich@suse.com>, xen-devel <xen-devel@lists.xen.org>
X-Original-Date Sat, 25 Jul 2015 09:03:54 -0700
X-Original-Message-ID <CALCETrV_oeS_kA3oNirWTwc00ze2v=QLmx6tZKU7sxt_+gMcAg@mail.gmail.com>
X-Original-References <cover.1437802102.git.luto@kernel.org> <7286d77aa81abc38dc40362e2439861427064f6f.1437802102.git.luto@kernel.org> <20150725091531.GE3427@nazgul.tnic>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1192395

Show key headers only | View raw


On Sat, Jul 25, 2015 at 2:15 AM, Borislav Petkov <bp@alien8.de> 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.
>>
>> Signed-off-by: Andy Lutomirski <luto@kernel.org>
>> ---
>>  arch/x86/Kconfig                   | 17 +++++++++++++++++
>>  arch/x86/include/asm/mmu.h         |  2 ++
>>  arch/x86/include/asm/mmu_context.h | 31 +++++++++++++++++++++++--------
>>  arch/x86/kernel/Makefile           |  3 ++-
>>  arch/x86/kernel/cpu/perf_event.c   |  4 ++++
>>  arch/x86/kernel/process_64.c       |  2 ++
>>  arch/x86/kernel/step.c             |  2 ++
>>  kernel/sys_ni.c                    |  1 +
>>  8 files changed, 53 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index b3a1a5d77d92..ede52be845db 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -1015,6 +1015,7 @@ config VM86
>>  config X86_16BIT
>>       bool "Enable support for 16-bit segments" if EXPERT
>>       default y
>> +     depends on MODIFY_LDT_SYSCALL
>>       ---help---
>>         This option is required by programs like Wine to run 16-bit
>>         protected mode legacy code on x86 processors.  Disabling
>> @@ -2053,6 +2054,22 @@ config CMDLINE_OVERRIDE
>>         This is used to work around broken boot loaders.  This should
>>         be set to 'N' under normal conditions.
>>
>> +config MODIFY_LDT_SYSCALL
>> +       bool "Enable the LDT (local descriptor table)" if EXPERT
>
>         bool "Enable modify_ldt() for per-process Local Descriptor Table"
>
> is how I'd call it.

Okay with me.

>
>> +       default y
>
> Is that "default y" going to turn into a "default n" after a grace
> period?

Let's see how Willy's default-off sysctl plays out.  In the long run,
maybe we'll have it compiled in but runtime-disabled by default.
There's a big community of users who *really* like using Wine :)

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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 2/3] x86/ldt: Make modify_ldt optional Andy Lutomirski <luto@amacapital.net> - 2015-07-25 18:10 +0200
  Re: [PATCH v4 2/3] x86/ldt: Make modify_ldt optional Willy Tarreau <w@1wt.eu> - 2015-07-25 18:40 +0200

csiph-web