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: <tencent_0A4AB3348A519A1A2EF46D99BF6A52D9BB06@qq.com>
Date: Mon, 21 Jul 2025 12:43:16 +0800
From: jackysliu <1972843537@...com>
To: tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org,
	Siyang Liu <1972843537@...com>
Subject: [PATCH] irqchip/ls-extirq: fix resource leak in ls_extirq_parse_map()

From: Siyang Liu <1972843537@...com>

The ls_extirq_parse_map function uses of_find_node_by_phandle() to obtain
interrupt parent nodes within a loop, but fails to release the reference
count on these nodes. This results in a kernel memory leak as the node
reference counts continuously increase.

Add of_node_put() calls to properly release the references when the nodes
are no longer needed

Signed-off-by: Siyang Liu <1972843537@...com>
---
 drivers/irqchip/irq-ls-extirq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-ls-extirq.c b/drivers/irqchip/irq-ls-extirq.c
index 50a7b38381b9..fb4e7b3a6e2f 100644
--- a/drivers/irqchip/irq-ls-extirq.c
+++ b/drivers/irqchip/irq-ls-extirq.c
@@ -164,6 +164,7 @@ ls_extirq_parse_map(struct ls_extirq_data *priv, struct device_node *node)
 		for (j = 0; j < intsize; ++j)
 			priv->map[hwirq].param[j] = be32_to_cpup(map++);
 		mapsize -= intsize;
+		of_node_put(ipar);
 	}
 	return 0;
 }
-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ