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: <CAEnQRZBEKoXeuUXat+EGfGcYMGKpRW-2RgNQWnKLXSxfKe+oFw@mail.gmail.com>
Date: Wed, 12 Feb 2025 11:22:44 +0200
From: Daniel Baluta <daniel.baluta@...il.com>
To: Laurentiu Mihalcea <laurentiumihalcea111@...il.com>
Cc: Mark Brown <broonie@...nel.org>, Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>, 
	Bard Liao <yung-chuan.liao@...ux.intel.com>, Daniel Baluta <daniel.baluta@....com>, 
	imx@...ts.linux.dev, linux-sound@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: SOF: imx-common: set sdev->pdata->hw_pdata after
 common is alloc'd

On Wed, Feb 12, 2025 at 12:50 AM Laurentiu Mihalcea
<laurentiumihalcea111@...il.com> wrote:
>
> From: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
>
> 'imx_unregister_action' uses 'sdev->pdata->hw_pdata' to fetch the pointer
> to the common data structure. As such, if 'sdev->pdata->hw_pdata' is not
> set before adding 'imx_unregister_action' to the devres list, we risk
> derefrencing a NULL pointer if any of the calls between
> 'devm_add_action_or_reset' and 'sdev->pdata->hw_pdata = common' fails.
>
> Set 'sdev->pdata->hw_pdata' to point to 'common' as soon as 'common' is
> allocated.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@....com>

Fixes: 651e0ed391b1 (" ASoC: SOF: imx: introduce more common
structures and functions")

Reviewed-by: Daniel Baluta <daniel.baluta@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ