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: <174966018088.3972888.266269916293367037.stgit@frogsfrogsfrogs>
Date: Wed, 11 Jun 2025 09:44:01 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: debianbugs@...dall.me.uk, linux-ext4@...r.kernel.org,
 linux-ext4@...r.kernel.org
Subject: [PATCH 2/3] fuse2fs: fix error bailout in op_create

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

Tim Woodall pointed out that op_create returns garbage error codes if
the ext2fs_extent_open2 in op_create fails.  Worse than that, it also
neglects to drop the bfl and leaks temp_path.  Let's fix all that.

Cc: <linux-ext4@...r.kernel.org> # v1.43
Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs")
Reported-by: Tim Woodall <debianbugs@...dall.me.uk>
Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 misc/fuse2fs.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index ad4795ae4ed907..cc023065727fd5 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -3306,8 +3306,11 @@ static int op_create(const char *path, mode_t mode, struct fuse_file_info *fp)
 		inode.i_flags &= ~EXT4_EXTENTS_FL;
 		ret = ext2fs_extent_open2(fs, child,
 					  EXT2_INODE(&inode), &handle);
-		if (ret)
-			return ret;
+		if (ret) {
+			ret = translate_error(fs, child, err);
+			goto out2;
+		}
+
 		ext2fs_extent_free(handle);
 	}
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ