linux/fs/overlayfs
Miklos Szeredi 56230d9567 ovl: verify permissions in ovl_path_open()
Check permission before opening a real file.

ovl_path_open() is used by readdir and copy-up routines.

ovl_permission() theoretically already checked copy up permissions, but it
doesn't hurt to re-do these checks during the actual copy-up.

For directory reading ovl_permission() only checks access to topmost
underlying layer.  Readdir on a merged directory accesses layers below the
topmost one as well.  Permission wasn't checked for these layers.

Note: modifying ovl_permission() to perform this check would be far more
complex and hence more bug prone.  The result is less precise permissions
returned in access(2).  If this turns out to be an issue, we can revisit
this bug.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2020-06-02 22:20:26 +02:00
..
copy_up.c ovl: prepare to copy up without workdir 2020-05-13 11:11:24 +02:00
dir.c ovl: initialize OVL_UPPERDATA in ovl_lookup() 2020-06-02 22:20:25 +02:00
export.c ovl: return required buffer size for file handles 2020-05-13 11:11:24 +02:00
file.c ovl: fix lockdep warning for async write 2020-03-13 15:53:06 +01:00
inode.c ovl: initialize OVL_UPPERDATA in ovl_lookup() 2020-06-02 22:20:25 +02:00
Kconfig ovl: fix some xino configurations 2020-03-13 15:53:06 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: fix redirect traversal on metacopy dentries 2020-06-02 22:20:25 +02:00
overlayfs.h ovl: fix out of bounds access warning in ovl_check_fb_len() 2020-06-02 22:20:25 +02:00
ovl_entry.h ovl: whiteout inode sharing 2020-05-13 11:11:24 +02:00
readdir.c ovl: switch to mounter creds in readdir 2020-06-02 22:20:25 +02:00
super.c ovl: sync dirty data when remounting to ro mode 2020-05-13 11:11:24 +02:00
util.c ovl: verify permissions in ovl_path_open() 2020-06-02 22:20:26 +02:00