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:   Fri, 9 Dec 2022 10:18:23 +0800
From:   Konstantin Meskhidze <konstantin.meskhidze@...wei.com>
To:     <trond.myklebust@...merspace.com>
CC:     <anna@...nel.org>, <linux-kernel@...r.kernel.org>,
        <linux-nfs@...r.kernel.org>, <yusongping@...wei.com>,
        <hukeping@...wei.com>, <artem.kuzin@...wei.com>
Subject: [PATCH] fs: NFSv4.1: Fix memory leakage

This commit fixes potential memory leakage of 'calldata' memory chunk
in _nfs41_proc_sequence() function.

Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@...wei.com>
---
 fs/nfs/nfs4proc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 86ed5c0142c3..b7aa66167341 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -9416,8 +9416,10 @@ static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp,
 	task_setup_data.callback_data = calldata;
 
 	ret = rpc_run_task(&task_setup_data);
-	if (IS_ERR(ret))
+	if (IS_ERR(ret)) {
+		kfree(calldata);
 		goto out_err;
+	}
 	return ret;
 out_put_clp:
 	nfs_put_client(clp);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ