lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175797570031.246189.33431710777569566.stgit@frogsfrogsfrogs>
Date: Mon, 15 Sep 2025 15:41:06 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 01/11] fuse2fs: check root directory while mounting

From: Darrick J. Wong <djwong@...nel.org>

The kernel will fail a mount attempt if the root directory inode isn't
even minimally readable at mount time.  Do the same for fuse2fs so that
we can pass ext4/008.

Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 misc/fuse2fs.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)


diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 569ac402427767..8389cc3a4872b2 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -4646,6 +4646,19 @@ static unsigned long long default_cache_size(void)
 	return ret;
 }
 
+/* Make sure the root directory is readable. */
+static errcode_t fuse2fs_check_root_dir(ext2_filsys fs)
+{
+	struct ext2_inode_large inode;
+	errcode_t err;
+
+	err = fuse2fs_read_inode(fs, EXT2_ROOT_INO, &inode);
+	if (err)
+		return translate_error(fs, EXT2_ROOT_INO, err);
+
+	return 0;
+}
+
 int main(int argc, char *argv[])
 {
 	struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
@@ -4821,6 +4834,10 @@ int main(int argc, char *argv[])
 		}
 	}
 
+	ret = fuse2fs_check_root_dir(global_fs);
+	if (ret)
+		goto out;
+
 	if (global_fs->flags & EXT2_FLAG_RW) {
 		if (ext2fs_has_feature_journal(global_fs->super))
 			log_printf(&fctx, "%s",


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ