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: <20240207210450.14652-1-maks.mishinFZ@gmail.com>
Date: Thu,  8 Feb 2024 00:04:50 +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] iplink: Fix descriptor leak in get_link_kind()

Found by RASU JSC

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

diff --git a/ip/iplink.c b/ip/iplink.c
index 95314af5..7e31b95c 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -168,6 +168,9 @@ struct link_util *get_link_kind(const char *id)
 
 	snprintf(buf, sizeof(buf), "%s_link_util", id);
 	l = dlsym(dlh, buf);
+	if (dlh != NULL)
+		dlclose(dlh);
+
 	if (l == NULL)
 		return NULL;
 
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ