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: <20240207210014.13820-1-maks.mishinFZ@gmail.com>
Date: Thu,  8 Feb 2024 00:00:14 +0300
From: Maks Mishin <maks.mishinfz@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Maks Mishin <maks.mishinFZ@...il.com>,
	netdev@...r.kernel.org
Subject: [PATCH] tc: Fix descriptor leak in get_filter_kind()

Add closure of fd `dlh`.

Found by RASU JSC

Signed-off-by: Maks Mishin <maks.mishinFZ@...il.com>
---
 tc/tc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tc/tc.c b/tc/tc.c
index 575157a8..4f89719c 100644
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -167,6 +167,9 @@ struct filter_util *get_filter_kind(const char *str)
 
 	snprintf(buf, sizeof(buf), "%s_filter_util", str);
 	q = dlsym(dlh, buf);
+	if (dlh != NULL)
+		dlclose(dlh);
+
 	if (q == NULL)
 		goto noexist;
 
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ