Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5878895ybi; Wed, 12 Jun 2019 10:00:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxg2MA0ZwH4dSDwJHSK3fwhoYlCtLCCEFPxs6LajawJU1VDI9peiP5p6Fzkca/Qgz4TQyAt X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr181790pjz.140.1560358824252; Wed, 12 Jun 2019 10:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560358824; cv=none; d=google.com; s=arc-20160816; b=EVAHysGPfKThrc/r8rSjIG63EjD/ySTHf0142/4ODcRs/yMxE6fsPdyIrDOcvZ9phU RK7CFeQSIgB6btTn85mgcBhYpwVG7ig2KZy9oTWNfHt/CeCo0bkA/vwmj5THjLok3uJE WmUkugL1rbH9oYTDd9Z7X8ZStap8XQQCmmREipwJSCvzHNsZD5OeUl0iV0/IEkrNndkg J3t8MAVKAjzqJcdrmcpz+rI41kJj5DzyEZUdRtP9l7fnmVu3CWkuVobbBT3UeSNc648j 16Vr/gtv+cxsRUpUQKCCkQ8Nl8DScAPnghhvzuEYsYbFRo1Wtc3tI6Zd13FwiA/Afecz vXZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=K7kXr8X+6wXHI45nEaCj+XFBPkjppL/k1QNtElhzwq8=; b=SXCZpJD2uxg+7wfEpayMve+Xu0qZBRjYH9XxkrNwo5oINpmkLJeefQgbN30HYrb3jr UB7gK7Ih6YO+O2yBEzhurruvsu0GgedRDdcXmlw3EeWsL/6213cgghLD6TCSW+r3uW4S LH97KAXEOcHK3aIkLA3Rg4HfFqUvTmgB5p+lrzWxaxf1hiSeYcvvyRG7vfwU0j551yI/ bQPYLXSnpUPpQ1zMgy6g5JZLmqZiiMjPJZ412cfobp1j8Ws4YtdGm4CwiMmeCrJQHWD4 kk06lEIKEaABQ2reO18QAYsFCawH3NtfiKCRTiFva3dskYhfhGaSo1BUe4p4XzipzYdF AxTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si276508pgk.400.2019.06.12.10.00.09; Wed, 12 Jun 2019 10:00:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728387AbfFLLnQ (ORCPT + 99 others); Wed, 12 Jun 2019 07:43:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38074 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728601AbfFLLnQ (ORCPT ); Wed, 12 Jun 2019 07:43:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C388D7573D; Wed, 12 Jun 2019 11:43:10 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-109.rdu2.redhat.com [10.10.120.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2927614C4; Wed, 12 Jun 2019 11:43:06 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <05ddc1e6-78ba-b60e-73b1-ffe86de2f2f8@tycho.nsa.gov> References: <05ddc1e6-78ba-b60e-73b1-ffe86de2f2f8@tycho.nsa.gov> <155991702981.15579.6007568669839441045.stgit@warthog.procyon.org.uk> <31009.1560262869@warthog.procyon.org.uk> To: Stephen Smalley Cc: dhowells@redhat.com, Casey Schaufler , Andy Lutomirski , viro@zeniv.linux.org.uk, linux-usb@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: What do LSMs *actually* need for checks on notifications? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25044.1560339786.1@warthog.procyon.org.uk> Date: Wed, 12 Jun 2019 12:43:06 +0100 Message-ID: <25045.1560339786@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 12 Jun 2019 11:43:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stephen Smalley wrote: > > (6) The security attributes of all the objects between the object in (5) > > and the object in (4), assuming we work from (5) towards (4) if the > > two aren't coincident (WATCH_INFO_RECURSIVE). > > Does this apply to anything other than mount notifications? Not at the moment. I'm considering making it such that you can make a watch on a keyring get automatically propagated to keys that get added to the keyring (and removed upon unlink) - the idea being that there is no 'single parent path' concept for a keyring as there is for a directory. I'm also pondering the idea of making it possible to have superblock watches automatically propagated to superblocks created by automount points on the watched superblock. > And for mount notifications, isn't the notification actually for a change to > the mount namespace, not a change to any file? Yes. > Hence, the real "object" for events that trigger mount notifications is the > mount namespace, right? Um... arguably. Would that mean that that would need a label from somewhere? > The watched path is just a way of identifying a subtree of the mount > namespace for notifications - it isn't the real object being watched. I like that argument. Thanks, David