Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp929084imu; Mon, 5 Nov 2018 10:56:28 -0800 (PST) X-Google-Smtp-Source: AJdET5f5EsgGzNfg3P1sdm46S071NsejE6QKRjiKmlYk94Y95COS29zVY4PqhP+mVowhEJoT5Mxd X-Received: by 2002:a17:902:684e:: with SMTP id f14-v6mr4905099pln.242.1541444188870; Mon, 05 Nov 2018 10:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541444188; cv=none; d=google.com; s=arc-20160816; b=Mg3Fb0FjVJSGVYZF2Blt8p+ZsLGAzILu0jDmzF+0v36H7sKTt/SOqp5w5C7CpQAOXq wKWN5lVy/BCsKxAsWfOKFbkuuSS59rR8aLoLLRn3gmrgxj1s8pfeSyb+MN27q6Kgu6RN wrAvjSUx27wBf0IFzay/9jOnmMWrGw/mcx+OfGcDbNph4EdVINuXBoSucQhP7thNUhD+ IS7bL5PVEQSJjo+QUzJRcgAv+ChcqZ4T3yNw8XzMXiupJpfjU5gU6CnpbvG9EpTn77vg csK7BAPYLtqY9g7v9Mg/FqKPTPspBEbzNLFRJDRD09aolTxGguZaVJQk+HjT7fyJ0We4 0/Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pYpnT5Aw/voFUXbalJP+VVpRDZL5f+GJ6XVIUU0XzQc=; b=muzNZBnyWC6C7zf0ub20eZwhCGs1scEMaDyFTOUgv/YK/Oioo4Us7nj0C18CfQaIC+ npXYe/0PRoHncAxU5Rl/52nuuJhnQMJgTYBaWYj+PfDTjuvgBNZxGS3+bNQAnZpmOd0m WteixqdmTlKlxZlWHLtsEK1f5QA+ayuTKaWL+0K6I1oPmPGItbyHVbBzTAVv7WMmup08 r5l32vznHG8i/vK/lH6SLwa9JlnL/FCFeVQzc+9rgxrSxH3XdP10vxq2eK2R6q/QmLdE PZzHEx49xjUYfdC6a1rbw7LYK3x/4JYluz2hXPFce9BnSk6vfpXcAw87UuehuWCfeEY4 IUXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uLFV1x9b; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2-v6si1064376pll.171.2018.11.05.10.56.12; Mon, 05 Nov 2018 10:56:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uLFV1x9b; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730140AbeKFEQx (ORCPT + 99 others); Mon, 5 Nov 2018 23:16:53 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:33298 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726932AbeKFEQx (ORCPT ); Mon, 5 Nov 2018 23:16:53 -0500 Received: by mail-yw1-f67.google.com with SMTP id z72-v6so4115604ywa.0; Mon, 05 Nov 2018 10:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pYpnT5Aw/voFUXbalJP+VVpRDZL5f+GJ6XVIUU0XzQc=; b=uLFV1x9bqKSkn8wx99aKsCtKj43N0txg0Ci7cJaXBZ2Ze4x0i7HveORSMKHuP0v9Sl /YjUFpTeAnq/Q6Ze9Hvg79vNCUzI2KC/ZtFYYI3hB00Cu4AFksUlvSJxYVuu9iD+xW9R arERh53lCBYFauD+S9lqL7hm1PspfpOC0Zewu1ykA0vvPd+IlqJqIn1+w+T5GULvEgWA gFApzwh1hbtZ2b4w3QTbGSovpN6BL0jzqhFg4SbsjmBD9qyhIzSGCvt+yfskBTimSjD0 6sVqXTUCn1O4O/XFGQlT/8k6WRrvYo8/HhiGXXoRiu8/JbnEaW/FX2jgB1sOaML1MBWu kn7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pYpnT5Aw/voFUXbalJP+VVpRDZL5f+GJ6XVIUU0XzQc=; b=XCTwcBb1/N5PXeY+QgYpgkir9pl7hNhlRaq8lBfy9WfnSaIgDWik3eTzuwtFKoSz8u srNy03Otk8BYX/u53aNoqpVvsmi762dGiBnEw0JCtfrO2N55FWOzJFtEP9a2w2aCaO1c tCVYh+ab+NEn2pSJj5NBkBWV37bDmToHSaktrLJmtgdgbPZQi3lxTVVWO5/SFesw5sBr tkpJypQXIPZZh6QmRLHx8tP0j78eZ3ivWT6mRqe2UU6VyFKtOSglxC4AxqFrOHbo6AaO sDq91ri7SeMbcWpoRqpzuGxXAaRLpSbj5EESkLXv4pnUqkfi9qOdwZnmv0+FQBHRz87c sj0g== X-Gm-Message-State: AGRZ1gJfsGmc3h6c1kOW7YXSrBlpr49+jOm0QL0LNtG0uxdeib2A64ug +iSV4gNvvPdQVf+vAwpbunRVa01tbG6kOZFfCG4= X-Received: by 2002:a81:ac1f:: with SMTP id k31-v6mr22022192ywh.248.1541444150476; Mon, 05 Nov 2018 10:55:50 -0800 (PST) MIME-Version: 1.0 References: <20181105182146.233025-1-salyzyn@android.com> In-Reply-To: <20181105182146.233025-1-salyzyn@android.com> From: Amir Goldstein Date: Mon, 5 Nov 2018 20:55:39 +0200 Message-ID: Subject: Re: [PATCH v6 0/2] To: Mark Salyzyn Cc: linux-kernel , Miklos Szeredi , Jonathan Corbet , Vivek Goyal , "Eric W. Biederman" , Randy Dunlap , Stephen Smalley , overlayfs , linux-doc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 5, 2018 at 8:22 PM Mark Salyzyn wrote: > > overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh > > Assumption never checked, should fail if the mounter creds are not > sufficient. > > overlayfs: override_creds=off option bypass creator_cred > > By default, all access to the upper, lower and work directories is the > recorded mounter's MAC and DAC credentials. The incoming accesses are > checked against the caller's credentials. > > If the principles of least privilege are applied, the mounter's > credentials might not overlap the credentials of the caller's when > accessing the overlayfs filesystem. For example, a file that a lower > DAC privileged caller can execute, is MAC denied to the generally > higher DAC privileged mounter, to prevent an attack vector. > > We add the option to turn off override_creds in the mount options; all > subsequent operations after mount on the filesystem will be only the > caller's credentials. The module boolean parameter and mount option > override_creds is also added as a presence check for this "feature", > existence of /sys/module/overlay/parameters/overlay_creds > > Signed-off-by: Mark Salyzyn > Cc: Miklos Szeredi > Cc: Jonathan Corbet > Cc: Vivek Goyal > Cc: Eric W. Biederman > Cc: Amir Goldstein > Cc: Randy Dunlap > Cc: Stephen Smalley > Cc: linux-unionfs@vger.kernel.org > Cc: linux-doc@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > > v2: > - Forward port changed attr to stat, resulting in a build error. > - altered commit message. > > v3: > - Change name from caller_credentials / creator_credentials to the > boolean override_creds. > - Changed from creator to mounter credentials. > - Updated and fortified the documentation. > - Added CONFIG_OVERLAY_FS_OVERRIDE_CREDS > > v4: > - spelling and grammar errors in text > > v5: > - beefed up the caveats in the Documentation > - Is dependent on > "overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh" > "overlayfs: check CAP_MKNOD before issuing vfs_whiteout" > - Added prwarn when override_creds=off > > v6: > - Drop CONFIG_OVERLAY_FS_OVERRIDE_CREDS. > - Do better with the documentation, drop rationalizations. > - pr_warn message adjusted to report consequences. For future reference, the cover letter is meant for introduction, not for concatenating all commit messages... Not sure how you generated this text. I think you were looking for git format-patch --cover. Anyway, IMO, having the patch revision in the cover letter is sufficient and you needn't bother with patch revision in every single patch, unless there is a good reason. Thanks, Amir.