linux/fs/overlayfs
Miklos Szeredi b9e3579213 ovl: don't allow datadir only
commit eb3a04a851 upstream.

In theory overlayfs could support upper layer directly referring to a data
layer, but there's no current use case for this.

Originally, when data-only layers were introduced, this wasn't allowed,
only introduced by the "datadir+" feature, but without actually handling
this case, resulting in an Oops.

Fix by disallowing datadir without lowerdir.

Reported-by: Giuseppe Scrivano <gscrivan@redhat.com>
Fixes: 24e16e385f ("ovl: add support for appending lowerdirs one by one")
Cc: <stable@vger.kernel.org> # v6.7
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Alexander Larsson <alexl@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-04-25 10:47:53 +02:00
..
copy_up.c ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up 2025-03-07 18:25:26 +01:00
dir.c ovl: fix copy-up in tmpfile 2024-05-28 10:06:55 +02:00
export.c ovl: support encoding fid from inode with no alias 2025-01-17 13:40:36 +01:00
file.c fs: pass offset and result to backing_file end_write() callback 2024-10-16 13:17:45 +02:00
inode.c ovl: properly handle large files in ovl_security_fileattr 2024-12-09 10:41:08 +01:00
Kconfig fs: prepare for stackable filesystems backing file helpers 2023-12-23 16:35:08 +02:00
Makefile ovl: Move xattr support to new xattrs.c file 2023-10-31 00:12:59 +02:00
namei.c ovl: pass realinode to ovl_encode_real_fh() instead of realdentry 2025-01-17 13:40:36 +01:00
overlayfs.h ovl: remove unused forward declaration 2025-04-25 10:47:39 +02:00
ovl_entry.h ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-23 12:39:48 +02:00
params.c ovl: fail if trusted xattrs are needed but caller lacks permission 2024-09-08 15:36:59 +02:00
params.h ovl: store and show the user provided lowerdir mount option 2023-10-31 00:13:02 +02:00
readdir.c ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-23 12:39:48 +02:00
super.c ovl: don't allow datadir only 2025-04-25 10:47:53 +02:00
util.c ovl: Filter invalid inodes with missing lookup function 2024-12-09 10:41:01 +01:00
xattrs.c ovl: Support escaped overlay.* xattrs 2023-10-31 00:12:59 +02:00