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] [thread-next>] [day] [month] [year] [list]
Message-Id: <D7D64PVB9HKZ.2UZWO7Z4FWSPV@gmail.com>
Date: Mon, 27 Jan 2025 16:20:34 -0500
From: "Kurt Borja" <kuurtb@...il.com>
To: "Fedor Pchelkin" <pchelkin@...ras.ru>, "Ike Panhc"
 <ike.pan@...onical.com>, "Hans de Goede" <hdegoede@...hat.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, "Mark
 Pearson" <mpearson-lenovo@...ebb.ca>, "Mario Limonciello"
 <mario.limonciello@....com>, <platform-driver-x86@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, <lvc-project@...uxtesting.org>
Subject: Re: [PATCH] platform/x86: ideapad-laptop: pass a correct pointer to
 the driver data

On Mon Jan 27, 2025 at 4:02 PM -05, Fedor Pchelkin wrote:
> devm_platform_profile_register() expects a pointer to the private driver
> data but instead an address of the pointer variable is passed due to a
> typo. This leads to the crashes later:
>
> BUG: unable to handle page fault for address: 00000000fe0d0044
> PGD 0 P4D 0
> Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
> CPU: 6 UID: 0 PID: 1284 Comm: tuned Tainted: G        W          6.13.0+ #7
> Tainted: [W]=WARN
> Hardware name: LENOVO 21D0/LNVNB161216, BIOS J6CN45WW 03/17/2023
> RIP: 0010:__mutex_lock.constprop.0+0x6bf/0x7f0
> Call Trace:
>  <TASK>
>  dytc_profile_set+0x4a/0x140 [ideapad_laptop]
>  _store_and_notify+0x13/0x40 [platform_profile]
>  class_for_each_device+0x145/0x180
>  platform_profile_store+0xc0/0x130 [platform_profile]
>  kernfs_fop_write_iter+0x13e/0x1f0
>  vfs_write+0x290/0x450
>  ksys_write+0x6c/0xe0
>  do_syscall_64+0x82/0x160
>  entry_SYSCALL_64_after_hwframe+0x76/0x7e
>
> Found by Linux Verification Center (linuxtesting.org).
>
> Fixes: 249c576f0f9d ("ACPI: platform_profile: Let drivers set drvdata to the class device")
> Signed-off-by: Fedor Pchelkin <pchelkin@...ras.ru>

This is my bad. Thanks!

Reviewed-by: Kurt Borja <kuurtb@...il.com>

> ---
>  drivers/platform/x86/ideapad-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index dfb5d4b8c046..30bd366d7b58 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -1121,7 +1121,7 @@ static int ideapad_dytc_profile_init(struct ideapad_private *priv)
>  
>  	/* Create platform_profile structure and register */
>  	priv->dytc->ppdev = devm_platform_profile_register(&priv->platform_device->dev,
> -							   "ideapad-laptop", &priv->dytc,
> +							   "ideapad-laptop", priv->dytc,
>  							   &dytc_profile_ops);
>  	if (IS_ERR(priv->dytc->ppdev)) {
>  		err = PTR_ERR(priv->dytc->ppdev);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ