Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645AbdFINPb (ORCPT ); Fri, 9 Jun 2017 09:15:31 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45704 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbdFINP3 (ORCPT ); Fri, 9 Jun 2017 09:15:29 -0400 X-Originating-IP: 72.66.113.207 Subject: Re: [PATCH v2 1/1] Add Trusted Path Execution as a stackable LSM To: Kees Cook , Mimi Zohar Cc: James Morris , "Serge E. Hallyn" , LKML , linux-security-module , "kernel-hardening@lists.openwall.com" References: <20170608034349.31876-1-matt@nmatt.com> <20170608034349.31876-2-matt@nmatt.com> <94ba5ebb-952b-2037-799e-07306629a6f9@nmatt.com> <1497003507.21594.177.camel@linux.vnet.ibm.com> From: Matt Brown Message-ID: <4bf3331c-9c02-1d76-01a8-92290800db7c@nmatt.com> Date: Fri, 9 Jun 2017 09:15:27 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 33 On 6/9/17 8:55 AM, Kees Cook wrote: > On Fri, Jun 9, 2017 at 3:18 AM, Mimi Zohar wrote: >> On Thu, 2017-06-08 at 23:50 -0400, Matt Brown wrote: >>>>> >>>>> * Issues: >>>>> * Can be bypassed by interpreted languages such as python. You can run >>>>> malicious code by doing: python -c 'evil code' >>>> >>>> What's the recommendation for people interested in using TPE but >>>> having interpreters installed? >>>> >>> >>> If you don't need a given interpreter installed, uninstall it. While >>> this is common sense system hardening it especially would make a >>> difference under the TPE threat model. >>> >>> I don't have a knock down answer for this. Interpreters are a hard >>> problem for TPE. >> >> You might be interested in the minor LSM named "shebang", that I >> posted as a proof of concept back in January, which restricts the >> python interactive prompt/interpreter, but allows the scripts >> themselves to be executed. > > https://patchwork.kernel.org/patch/9547405/ > > Maybe these could be merged and the interpreter string could be made > into a configurable list? > Yes this looks promising. I'll look into integrating this. Matt