From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933920AbdGKTba (ORCPT ); Tue, 11 Jul 2017 15:31:30 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33275 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933821AbdGKTb3 (ORCPT ); Tue, 11 Jul 2017 15:31:29 -0400 Subject: Re: [kernel-hardening] [PATCH 00/11] S.A.R.A. a new stacked LSM From: Mimi Zohar To: Matt Brown , Salvatore Mesoraca , =?ISO-8859-1?Q?Micka=EBl_Sala=FCn?= Cc: kernel list , linux-security-module , Kernel Hardening , Brad Spengler , PaX Team , Casey Schaufler , Kees Cook , James Morris , "Serge E. Hallyn" Date: Tue, 11 Jul 2017 15:31:16 -0400 In-Reply-To: <69ff2195-d0e1-8a0f-b80e-5d8d55947907@nmatt.com> References: <1497286620-15027-1-git-send-email-s.mesoraca16@gmail.com> <53a2d710-b0f0-cdf9-e7ad-cd8d03fc835a@digikod.net> <69ff2195-d0e1-8a0f-b80e-5d8d55947907@nmatt.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable x-cbid: 17071119-0008-0000-0000-0000014FCE8E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071119-0009-0000-0000-000009804467 Message-Id: <1499801476.6034.265.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-11_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707110315 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-07-11 at 13:49 -0400, Matt Brown wrote: > I have merged my TPE LSM with Mimi Zohar's shebang LSM and will be > releasing a version 3 soon. I have also added securityfs support to > shebang that will allow users to update the interpreter list at run > time. This allows for user's to configure TPE/Shebang without any > xattrs. For a preview of my version 3 you can check out my dev tree > here: > https://github.com/nmatt0/linux-security/tree/tpe/security/tpe > > Note: that git tree is WIP and may not have all of the attribution and > documentation needed. You'll want to detect when an interpreter is deleted or renamed.  I would define security_inode_rename, security_path_rename, security_inode_unlink and security_path_unlink hooks. "rename" could be an indication that the existing interpreter is being updated. "unlink" indicates that the interpreter has been deleted.  At either of these points, you'll want to start checking for the creation of a new file with the expected pathname. Mimi