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>] [day] [month] [year] [list]
Message-Id: <20240904144832.28857-1-adiupina@astralinux.ru>
Date: Wed,  4 Sep 2024 17:48:32 +0300
From: Alexandra Diupina <adiupina@...ralinux.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Alexandra Diupina <adiupina@...ralinux.ru>,
	Steve French <sfrench@...ba.org>,
	stable@...r.kernel.org,
	Aurelien Aptel <aaptel@...e.com>,
	Paulo Alcantara <palcantara@...e.de>,
	linux-cifs@...r.kernel.org,
	samba-technical@...ts.samba.org,
	linux-kernel@...r.kernel.org,
	lvc-project@...uxtesting.org
Subject: [PATCH 5.10] cifs: Fix freeing non heap memory in dup_vol()

Remove kfree(&vi->smb_vol), since &vi->smb_vol
is a pointer to an area inside the allocated memory.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 54be1f6c1c37 ("cifs: Add DFS cache routines")
Signed-off-by: Alexandra Diupina <adiupina@...ralinux.ru>
---
 fs/cifs/dfs_cache.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 7b6db272fd0b..da6d775102f2 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -1194,7 +1194,6 @@ static int dup_vol(struct smb_vol *vol, struct smb_vol *new)
 	kfree_sensitive(new->password);
 err_free_username:
 	kfree(new->username);
-	kfree(new);
 	return -ENOMEM;
 }
 
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ