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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZxjiI3at4r+QGBMK@graute-think>
Date: Wed, 23 Oct 2024 13:46:43 +0200
From: Oliver Graute <oliver.graute@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-input@...r.kernel.org,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>,
	Felix Kaechele <felix@...chele.ca>,
	Andreas Kemnade <andreas@...nade.info>,
	Li Zetao <lizetao1@...wei.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: edt-ft5x06 - fix regmap leak when probe fails

On 18/10/24, Dmitry Torokhov wrote:
> The driver neglects to free the instance of I2C regmap constructed at
> the beginning of the edt_ft5x06_ts_probe() method when probe fails.
> Additionally edt_ft5x06_ts_remove() is freeing the regmap too early,
> before the rest of the device resources that are managed by devm are
> released.
> 
> Fix this by installing a custom devm action that will ensure that the
> regmap is released at the right time during normal teardown as well as
> in case of probe failure.
> 
> Note that devm_regmap_init_i2c() could not be used because the driver
> may replace the original regmap with a regmap specific for M06 devices
> in the middle of the probe, and using devm_regmap_init_i2c() would
> result in releasing the M06 regmap too early.
> 
> Reported-by: Li Zetao <lizetao1@...wei.com>
> Fixes: 9dfd9708ffba ("Input: edt-ft5x06 - convert to use regmap API")
> Cc: stable@...r.kernel.org
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

Reviewed-by: Oliver Graute <oliver.graute@...oconnector.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ