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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241013-trusted_foundations-of_node_put-v1-1-093ab98614ac@gmail.com>
Date: Sun, 13 Oct 2024 15:12:46 +0200
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Stephen Warren <swarren@...dia.com>, Tomasz Figa <t.figa@...sung.com>, 
 Alexandre Courbot <acourbot@...dia.com>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org, 
 Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: [PATCH] firmware: tf: fix missing of_node_put() in
 of_register_trusted_foundation()

of_find_compatible_node() requires a call to of_node_put() when the
pointer to the node is not required anymore to decrement its refcount
and avoid leaking memory.

Add the missing call to of_node_put() after the node has been used.

Cc: stable@...r.kernel.org
Fixes: d9a1beaa10e8 ("ARM: add basic support for Trusted Foundations")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
---
 drivers/firmware/trusted_foundations.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/trusted_foundations.c b/drivers/firmware/trusted_foundations.c
index 1389fa9418a7..e9fc79805c3e 100644
--- a/drivers/firmware/trusted_foundations.c
+++ b/drivers/firmware/trusted_foundations.c
@@ -175,6 +175,7 @@ void of_register_trusted_foundations(void)
 				   &pdata.version_minor);
 	if (err != 0)
 		panic("Trusted Foundation: missing version-minor property\n");
+	of_node_put(node);
 	register_trusted_foundations(&pdata);
 }
 

---
base-commit: d61a00525464bfc5fe92c6ad713350988e492b88
change-id: 20241013-trusted_foundations-of_node_put-4b905f3ba009

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ