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: <20211203174848.43879-1-amhamza.mgc@gmail.com>
Date:   Fri,  3 Dec 2021 22:48:48 +0500
From:   Ameer Hamza <amhamza.mgc@...il.com>
To:     jmaloy@...hat.com, ying.xue@...driver.com, davem@...emloft.net,
        kuba@...nel.org
Cc:     tipc-discussion@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, amhamza.mgc@...il.com
Subject: [PATCH] tipc: fixed possible memory leak issue

Fixed coverity warning by freeing the memory before return

Addresses-Coverity: 1494433 ("Resource leak")

Signed-off-by: Ameer Hamza <amhamza.mgc@...il.com>
---
 net/tipc/crypto.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index b4d9419a015b..10e6d0e9ddbc 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -599,6 +599,7 @@ static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey,
 	tmp->key = kmemdup(ukey, tipc_aead_key_size(ukey), GFP_KERNEL);
 	if (!tmp->key) {
 		tipc_aead_free(&tmp->rcu);
+		kfree_sensitive(tmp);
 		return -ENOMEM;
 	}
 	memcpy(&tmp->salt, ukey->key + keylen, TIPC_AES_GCM_SALT_SIZE);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ