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: <20251208033606.10647-1-vulab@iscas.ac.cn>
Date: Mon,  8 Dec 2025 03:36:06 +0000
From: Wentao Liang <vulab@...as.ac.cn>
To: eajames@...ux.ibm.com,
	ninad@...ux.ibm.com
Cc: linux-fsi@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org,
	Wentao Liang <vulab@...as.ac.cn>,
	stable@...r.kernel.org
Subject: [PATCH] fsi: master-gpio: Fix reference count leak in probe error path

The function of_node_get() returns a node pointer with its refcount
incremented, but in the error path of the fsi_master_gpio_probe(),
this reference is not released before freeing the master structure,
causing a refcount leak.

Add the missing of_node_put() in the error handling path to properly
release the device tree node reference.

Fixes: 8ef9ccf81044 ("fsi: master-gpio: Add missing release function")
Cc: stable@...r.kernel.org
Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
---
 drivers/fsi/fsi-master-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c
index 69de0b5b9cbd..ae9e156284d0 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -861,6 +861,7 @@ static int fsi_master_gpio_probe(struct platform_device *pdev)
 	}
 	return 0;
  err_free:
+	of_node_put(master->master.dev.of_node);
 	kfree(master);
 	return rc;
 }
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ