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-prev] [day] [month] [year] [list]
Message-ID: <20251106165056.GB1949330@google.com>
Date: Thu, 6 Nov 2025 16:50:56 +0000
From: Lee Jones <lee@...nel.org>
To: Miaoqian Lin <linmq006@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	Thor Thayer <thor.thayer@...ux.intel.com>,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] mfd: altera-sysmgr: Fix device reference leak in
 altr_sysmgr_regmap_lookup_by_phandle

On Tue, 28 Oct 2025, Miaoqian Lin wrote:

> driver_find_device_by_of_node() calls driver_find_device(), which calls
> get_device(). get_device() increments the device's reference count,
> so driver_find_device_by_of_node() returns a device
> with its reference count incremented.
> We need to release this reference after usage to avoid a reference leak.
> 
> Add put_device(dev) after dev_get_drvdata() to fix the reference leak.
> 
> Found via static analysis.
> 
> Fixes: f36e789a1f8d ("mfd: altera-sysmgr: Add SOCFPGA System Manager")
> Cc: stable@...r.kernel.org
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>

Looks like Johan beat you to it.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ