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]
Date:   Wed, 27 Oct 2021 11:39:25 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     Yu Kuai <yukuai3@...wei.com>,
        Dongliang Mu <mudongliangabcd@...il.com>,
        Jan Kara <jack@...e.cz>, Miklos Szeredi <mszeredi@...hat.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        David Howells <dhowells@...hat.com>
Cc:     reiserfs-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] fs: reiserfs: free new_opts in reiserfs_remount

Since the commit c3d98ea08291 ("VFS: Don't use save/replace_mount_options
if not using generic_show_options") eliminates replace_mount_options
in reiserfs, but did not handle the allocated new_opts,
it will cause memory leak in the reiserfs_remount.

Fix this by freeing new_opts in the reiserfs_remount temporarily.

Fixes: c3d98ea08291 ("VFS: Don't use save/replace_mount_options if not using generic_show_options")
Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
---
 fs/reiserfs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 58481f8d63d5..b36865c8b66a 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1594,6 +1594,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
 	}
 
 out_ok_unlocked:
+	kfree(new_opts);
 	return 0;
 
 out_err_unlock:
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ