Skip to content

overlayfs override_creds=off

Mark Salyzyn ceph-devel cluster-devel ecryptfs linux-f2fs-devel linux-integrity linux-mm linux-mtd linux-security-module linux-unionfs reiserfs-devel 9 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v13 Latest posting 2/20 of 5 patches 0 repliesNew
  2. v13 posting 1/25 patches 1 replySuperseded
  3. v125 patches 1 replySuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v114 patches0 repliesSuperseded
v105 patches15 repliesSuperseded
v92 patches0 repliesSuperseded
v82 patches10 repliesSuperseded
v72 patches1 replySuperseded
v62 patches5 repliesSuperseded

Changes in v13 from the cover letter

- add flags argument to __vfs_getxattr
- drop GFP_NOFS side-effect

Patches in v13 posting 2/2 No applies recorded yet

None of the 5 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v13 yet.

Read the v13 thread

Cover letter [PATCH v13 0/5] overlayfs override_creds=off

Patch series:

overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh Add flags option to get xattr method paired to __vfs_getxattr
overlayfs: handle XATTR_NOSECURITY flag for get xattr method
overlayfs: internal getxattr operations without sepolicy checking
overlayfs: override_creds=off option bypass creator_cred

The first four patches address fundamental security issues that should be solved regardless of the override_creds=off feature.
on them).

The fifth adds the feature depends on these other fixes.

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 for sepolicy, 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

Cc Miklos Szeredi <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Vivek Goyal <[email protected]>
Cc Eric W. Biederman <[email protected]>
Cc Amir Goldstein <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Stephen Smalley <[email protected]>
Cc Eric Van Hensbergen <[email protected]>
Cc Latchesar Ionkov <[email protected]>
Cc Dominique Martinet <[email protected]>
Cc David Howells <[email protected]>
Cc Chris Mason <[email protected]>
Cc Josef Bacik <[email protected]>
Cc David Sterba <[email protected]>
Cc Jeff Layton <[email protected]>
Cc Sage Weil <[email protected]>
Cc Ilya Dryomov <[email protected]>
Cc Steve French <[email protected]>
Cc Tyler Hicks <[email protected]>
Cc Jan Kara <[email protected]>
Cc Theodore Ts'o <[email protected]>
Cc Andreas Dilger <[email protected]>
Cc Jaegeuk Kim <[email protected]>
Cc Chao Yu <[email protected]>
Cc Bob Peterson <[email protected]>
Cc Andreas Gruenbacher <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Dave Kleikamp <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Trond Myklebust <[email protected]>
Cc Anna Schumaker <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Mike Marshall <[email protected]>
Cc Martin Brandenburg <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Phillip Lougher <[email protected]>
Cc Darrick J. Wong <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc David S. Miller <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Mathieu Malaterre <[email protected]>
Cc Ernesto A. Fernandez <[email protected]>
Cc Vyacheslav Dubeyko <[email protected]>
Cc [email protected] # 4.4, 4.9, 4.14 & 4.19

---
v13:
- add flags argument to __vfs_getxattr
- drop GFP_NOFS side-effect

v12:
- Restore squished out patch 2 and 3 in the series, then change algorithm to add flags argument. Per-thread flag is a large security surface.

v11:
- Squish out v10 introduced patch 2 and 3 in the series, then and use per-thread flag instead for nesting.
- Switch name to ovl_do_vds_getxattr for __vds_getxattr wrapper.
- Add sb argument to ovl_revert_creds to match future work.

v10:
- Return NULL on CAP_DAC_READ_SEARCH
- Add __get xattr method to solve sepolicy logging issue
- Drop unnecessary sys_admin sepolicy checking for administrative driver internal xattr functions.

v6:
- Drop CONFIG_OVERLAY_FS_OVERRIDE_CREDS.
- Do better with the documentation, drop rationalizations.
- pr_warn message adjusted to report consequences.

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

v4:
- spelling and grammar errors in text

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

v2:
- Forward port changed attr to stat, resulting in a build error.
- altered commit message.