Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751236AbdFCWbj (ORCPT ); Sat, 3 Jun 2017 18:31:39 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47226 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbdFCWbi (ORCPT ); Sat, 3 Jun 2017 18:31:38 -0400 X-Originating-IP: 72.66.113.207 Subject: Re: [kernel-hardening] [PATCH v1 1/1] Add Trusted Path Execution as a stackable LSM To: Jann Horn References: <20170603055351.16080-1-matt@nmatt.com> Cc: james.l.morris@oracle.com, serge@hallyn.com, kernel list , linux-security-module@vger.kernel.org, Kernel Hardening From: Matt Brown Message-ID: <1186cd9b-f689-2ea5-f5d2-62893ce7489f@nmatt.com> Date: Sat, 3 Jun 2017 18:30:08 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 26 On 06/03/2017 06:39 AM, Jann Horn wrote: > On Sat, Jun 3, 2017 at 7:53 AM, Matt Brown wrote: >> This patch was modified from Brad Spengler's Trusted Path Execution (TPE) >> feature in Grsecurity and also incorporates logging ideas from >> cormander's tpe-lkm. >> >> Modifications from the Grsecurity implementation of TPE were made to >> turn it into a stackable LSM using the existing LSM hook bprm_set_creds. >> Also, denial messages were improved by including the full path of the >> disallowed program. (This idea was taken from cormander's tpe-lkm) > [...] >> Threat Models: > [...] >> 2. Attacker on system replaces binary used by a privileged user with a >> malicious one >> >> * This situation arises when administrator of a system leaves a binary >> as world writable. >> >> * TPE is very effective against this threat model > > How do you end up with world-writable binaries in $PATH? > Sys Admin screw up. It also protects against world-writable binaries anywhere on the system, not just in $PATH.