From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D954C43381 for ; Fri, 29 Mar 2019 18:07:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEDFD2184D for ; Fri, 29 Mar 2019 18:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729826AbfC2SHa (ORCPT ); Fri, 29 Mar 2019 14:07:30 -0400 Received: from namei.org ([65.99.196.166]:59202 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729809AbfC2SHa (ORCPT ); Fri, 29 Mar 2019 14:07:30 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x2TI6blo000770; Fri, 29 Mar 2019 18:06:37 GMT Date: Sat, 30 Mar 2019 05:06:37 +1100 (AEDT) From: James Morris To: Micah Morton cc: serge@hallyn.com, keescook@chromium.org, casey@schaufler-ca.com, sds@tycho.nsa.gov, linux-security-module@vger.kernel.org Subject: Re: [PATCH v5 1/2] LSM: SafeSetID: gate setgid transitions In-Reply-To: <20190305154922.61040-1-mortonm@chromium.org> Message-ID: References: <20190305154922.61040-1-mortonm@chromium.org> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Tue, 5 Mar 2019, mortonm@chromium.org wrote: > From: Micah Morton > > This patch generalizes the 'task_fix_setuid' LSM hook to enable hooking > setgid transitions as well as setuid transitions. The hook is renamed to > 'task_fix_setid'. The patch introduces calls to this hook from the > setgid functions in kernel/sys.c. This will allow the SafeSetID LSM to > govern setgid transitions in addition to setuid transitions. This patch > also makes sure the setgid functions in kernel/sys.c call > security_capable_setid rather than the ordinary security_capable > function, so that the security_capable hook in the SafeSetID LSM knows > it is being invoked from a setid function. > > Signed-off-by: Micah Morton Wondering if there are any further comments or reviews for this before it is merged? -- James Morris