Skip to content

Backport Fix incorrect overlayfs mmap() and mprotect() LSM access controls

Cai Xinchen bpf linux-fsdevel linux-security-module linux-unionfs lkml selinux stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ovl: pass layer mnt to ovl_open_realfile()fs/overlayfs/file.c fs/overlayfs/overlayfs.h fs/overlayfs/util.c+28 -90 replies
2/7fs: move kmem_cache_zalloc() into alloc_empty_file*() helpersfs/file_table.c+26 -150 replies
3/7fs: use backing_file container for internal files with "fake" f_pathfs/file_table.c fs/internal.h fs/open.c +2 more+114 -230 replies
4/7lsm: constify the 'file' parameter in security_binder_transfer_file()include/linux/lsm_hook_defs.h include/linux/security.h security/security.c +1 more+8 -80 replies
5/7fs: prepare for adding LSM blob to backing_filefs/file_table.c+19 -10 replies
6/7lsm: add backing_file LSM hooksfs/file_table.c fs/internal.h fs/open.c +7 more+190 -150 replies
7/7selinux: fix overlayfs mmap() and mprotect() access checkssecurity/selinux/hooks.c security/selinux/include/objsec.h+190 -650 replies

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchGiuseppe ScrivanoChristian Brauner (Microsoft)Amir GoldsteinSerge HallynChristoph Hellwig
1/7T-b R-b
2/7R-b
3/7
4/7
5/7R-b
6/7R-b R-b R-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH stable/linux-5.10.y 0/7] Backport Fix incorrect overlayfs mmap() and mprotect() LSM access controls

ackport the patch series
"Fix incorrect overlayfs mmap() and mprotect() LSM access controls" [1] to 5.10 lts

I test selinux-testsuite[2] overlay test, it pass 135 tests.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://github.com/SELinuxProject/selinux-testsuite

Amir Goldstein (4):
ovl: pass layer mnt to ovl_open_realfile()
fs: move kmem_cache_zalloc() into alloc_empty_file*() helpers
fs: use backing_file container for internal files with "fake" f_path
fs: prepare for adding LSM blob to backing_file

Khadija Kamran (1):
lsm: constify the 'file' parameter in security_binder_transfer_file()

Paul Moore (2):
lsm: add backing_file LSM hooks
selinux: fix overlayfs mmap() and mprotect() access checks

 fs/file_table.c                   | 125 +++++++++++++--
 fs/internal.h                     |   6 +-
 fs/open.c                         |  46 ++++--
 fs/overlayfs/file.c               |  32 ++--
 fs/overlayfs/overlayfs.h          |   1 +
 fs/overlayfs/util.c               |  14 ++
 include/linux/fs.h                |  46 +++++-
 include/linux/lsm_audit.h         |   2 +-
 include/linux/lsm_hook_defs.h     |   7 +-
 include/linux/lsm_hooks.h         |   1 +
 include/linux/security.h          |  26 ++-
 security/security.c               | 112 ++++++++++++-
 security/selinux/hooks.c          | 252 ++++++++++++++++++++++--------
 security/selinux/include/objsec.h |  11 ++
 14 files changed, 560 insertions(+), 121 deletions(-)
Signature · 1 line
2.18.0.huawei.25