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-next>] [day] [month] [year] [list]
Message-ID: <20251203070813.1448-1-vulab@iscas.ac.cn>
Date: Wed,  3 Dec 2025 15:08:13 +0800
From: Haotian Zhang <vulab@...as.ac.cn>
To: linkinjeon@...nel.org,
	sj1557.seo@...sung.com,
	yuezhang.mo@...y.com
Cc: linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Haotian Zhang <vulab@...as.ac.cn>
Subject: [PATCH] fs: exfat: Fix corrupted error code handling in exfat_find_empty_entry()

exfat_find_empty_entry() stores the return value of
exfat_alloc_cluster() in an unsigned int. When
exfat_alloc_cluster() returns a negative errno, it is
converted to a large positive value, which corrupts
error propagation to the caller.

Change the type of ret to int so that negative errno
values are preserved.

Fixes: 5f2aa075070c ("exfat: add inode operations")
Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
---
 fs/exfat/namei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index f5f1c4e8a29f..f2a87ecd79f9 100644
--- a/fs/exfat/namei.c
+++ b/fs/exfat/namei.c
@@ -304,8 +304,8 @@ static int exfat_find_empty_entry(struct inode *inode,
 		struct exfat_chain *p_dir, int num_entries,
 		struct exfat_entry_set_cache *es)
 {
-	int dentry;
-	unsigned int ret, last_clu;
+	int dentry, ret;
+	unsigned int last_clu;
 	loff_t size = 0;
 	struct exfat_chain clu;
 	struct super_block *sb = inode->i_sb;
-- 
2.50.1.windows.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ