From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2E233B65 for ; Tue, 24 Jan 2017 20:58:23 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 555961BD for ; Tue, 24 Jan 2017 20:58:22 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id r136so121022144vke.1 for ; Tue, 24 Jan 2017 12:58:22 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <31033.1485168526@warthog.procyon.org.uk> From: Andy Lutomirski Date: Tue, 24 Jan 2017 12:58:00 -0800 Message-ID: To: Tetsuo Handa Content-Type: text/plain; charset=UTF-8 Cc: Josh Armour , "ksummit-discuss@lists.linuxfoundation.org" , Greg KH , "linux-mm@kvack.org" Subject: Re: [Ksummit-discuss] security-related TODO items? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Jan 24, 2017 at 2:32 AM, Tetsuo Handa wrote: > Hello. > > Can I read archive of the discussion of this topic from the beginning? > I felt that this topic might be an opportunity of proposing my execute handler > approach. It should be in the linux-mm archives. > > In TOMOYO LSM (out of tree version), administrator can specify a program > called execute handler which should be executed on behalf of a program > requested by execve(). The specified program performs validation (e.g. whether > argv[]/envp[] are appropriate) and setup (e.g. redirect file handles) before > executing the program requested by execve(). > > Conceptually execute handler is something like > > #!/bin/sh > test ... || exit 1 > test ... || exit 1 > test ... || exit 1 > exec ... > > which would in practice be implemented using C like > https://osdn.net/projects/tomoyo/scm/svn/blobs/head/tags/ccs-tools/1.8.5p1/usr_lib_ccs/audit-exec-param.c . > It is not difficult to implement the kernel side as well. > The difference is that that last exec means that the kernel is still exposed to any bugs in its ELF parser. Moving that to user mode would reduce the attack surface.