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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251123121339.25501-1-anmuxixixi@gmail.com>
Date: Sun, 23 Nov 2025 20:13:39 +0800
From: YangWen <anmuxixixi@...il.com>
To: linkinjeon@...nel.org,
	sj1557.seo@...sung.com,
	yuezhang.mo@...y.com
Cc: linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	YangWen <anmuxixixi@...il.com>
Subject: [PATCH] exfat: fix memory leak in exfat_fill_super

If exFAT encounters errors during multiple mount operations, 'sbi' and 'nls' will not be released,
which will cause a memory leak.

Fixes: 719c1e1829166 ("exfat: add super block operations")
Signed-off-by: YangWen <anmuxixixi@...il.com>
---
 fs/exfat/super.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 74d451f732c7..db28a426206c 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -722,10 +722,15 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
 	sb->s_root = NULL;
 
 free_table:
+	exfat_free_upcase_table(sbi);
 	exfat_free_bitmap(sbi);
 	brelse(sbi->boot_bh);
 
 check_nls_io:
+	unload_nls(sbi->nls_io);
+	exfat_free_iocharset(sbi);
+	sb->s_fs_info = NULL;
+	kfree(sbi);
 	return err;
 }
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ