Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp968595imu; Tue, 20 Nov 2018 09:33:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/VIUn1Pgv9SiEiCJmtFn1pB5JP7SS+WmA/W029Yq0k6yezWaOL7Lm9pYM0QgoLHEViWxPXS X-Received: by 2002:a17:902:4222:: with SMTP id g31mr3137614pld.240.1542735204099; Tue, 20 Nov 2018 09:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542735204; cv=none; d=google.com; s=arc-20160816; b=vf0niasKYy2WvAmjJ2+bn+wkQwRQH+eqfI8AGSZ1fEAeCwTmIetLsjWD59IPj5ehwX XvZ7NQCCYhyqta3TRV9KU1asUWuHDFAL/oCJQxQBwDEiFrYKCn62pcCy33f/0jOeyjD3 FYStBTaiqF0mSPh1StSoLxcB5AxPOWImRlge/s3m5xv12JDwA3JFAe+I4tl7HLD2tiLm xfePJAzkRqV4Y7MslSoLSSnnyM9Z9lVVxEYKJjlJczBkTRy241qM5X/JJTQOdIcb3cN3 eF8zba+kJRIpWaLdrwvGIlNKuHIDS9YQSbt03LyLQe6DYglgvR+rf6yztaRLcXoHyF8b UEnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from; bh=TCzfrwJoNmBTDo4xixqRnTogMnYon9yymPAaifMRNTY=; b=P8wRTqHwTnW6g8PsbglxHNOJ3/3HZ2S9JRU4CXCoiEXHCEWv3KxrxMG3td1dICOCtV 40EDR/FcAjl77pon+GyubAAyfokEjYeOQBFOZ6nD8p0VHwv2rX4LeIcTuePE+BnzmMHq LbhU4z27Su8xW22xNWuw35TO4f4RgOa+WjE/eNDEhetLDnSpkWgvoU34ZhZwcrh3H5UG gZvzJ275TrRoQjvsQfu+YTPfJMGxQ2iPKiDwBIeYZ/K1ILwh7SydLrPxw7fkxCAq0v2s 0isrxDd/0dX3kgGhcRg2t82x7F4rFLFqFCmG0tIOoF+9oI8Y0U5e2/qOZZEuQyUTSkAQ W6sQ== 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 h32si7631180pgh.276.2018.11.20.09.32.58; Tue, 20 Nov 2018 09:33:24 -0800 (PST) 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 S1730517AbeKUEBx (ORCPT + 99 others); Tue, 20 Nov 2018 23:01:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46614 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728259AbeKUEBx (ORCPT ); Tue, 20 Nov 2018 23:01:53 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 134BD30820E4; Tue, 20 Nov 2018 17:31:37 +0000 (UTC) Received: from x2.localnet (ovpn-120-172.rdu2.redhat.com [10.10.120.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 645BD7B8C1; Tue, 20 Nov 2018 17:31:30 +0000 (UTC) From: Steve Grubb To: Richard Guy Briggs Cc: Miklos Szeredi , linux-kernel@vger.kernel.org, linux-audit@redhat.com, Al Viro , linux-fsdevel@vger.kernel.org, Eric Paris , Paul Moore Subject: Re: [RFC PATCH ghak100 V1 1/2] audit: avoid fcaps on MNT_FORCE Date: Tue, 20 Nov 2018 12:31:30 -0500 Message-ID: <17943076.6Ld0qRUFEn@x2> Organization: Red Hat In-Reply-To: <20181120154820.4s6jflcnyu4ha5qn@madcap2.tricolour.ca> References: <20181120154820.4s6jflcnyu4ha5qn@madcap2.tricolour.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 20 Nov 2018 17:31:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, November 20, 2018 10:48:20 AM EST Richard Guy Briggs wrote: > On 2018-11-20 09:17, Miklos Szeredi wrote: > > On Mon, Nov 19, 2018 at 11:59 PM Richard Guy Briggs wrote: > > > The simple answer is that the audit PATH record format expects the four > > > cap_f* fields to be there and a best effort is being attempted to fill > > > in that information in an expected way with meaningful values. Perhaps > > > better to accept that it is unreasonable to expect any fcaps on any > > > umount operation and simply ignore those fields in the PATH record for > > > umount syscall events. > > > > When there's a mount there are in fact two objects belonging to the > > exact same path, each having completely independent metadata: the > > mount point and the root of the mount. For example: > > > > stat /mnt > > umount /mnt > > stat /mnt > > > > The first stat will show the root of the mount, the second one will > > show the mount point. > > Which one is the relevant for audit? > > It would be the root of the mount, the one that is visible to processes > in that mount namespace. > > Obviously, once that mount has been unmounted, it would be the mount > point (no longer in use as such at that point) that is of interest. > > On mounting, I'm guessing both would be of interest if the fcaps changed > for that process-visible path in that mount namespace, so this provides > an additional operation that would need recording aside from the case > of a simple attribute change. fcaps are on files. Mountpoints are directories. Would fcaps changes be possible? -Steve > > Not saying audit should be doing getxattr on any of them, just trying > > to see more clearly. > > > > Thanks, > > Miklos > > - RGB > > -- > Richard Guy Briggs > Sr. S/W Engineer, Kernel Security, Base Operating Systems > Remote, Ottawa, Red Hat Canada > IRC: rgb, SunRaycer > Voice: +1.647.777.2635, Internal: (81) 32635