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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMCT+izizEg0gPLD@lahna.fi.intel.com>
Date:   Wed, 9 Jun 2021 13:12:10 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Henning Schild <henning.schild@...mens.com>
Cc:     linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
        Andy Shevchenko <andy@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] pinctrl: intel: fix NULL pointer deref

Hi,

On Wed, Jun 09, 2021 at 08:27:22AM +0200, Henning Schild wrote:
> match could be NULL in which case we do not go ACPI after all
> 
> Signed-off-by: Henning Schild <henning.schild@...mens.com>
> ---
>  drivers/pinctrl/intel/pinctrl-intel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> index 85750974d182..dca17bb76cac 100644
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -1601,12 +1601,12 @@ const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_
>  	const struct intel_pinctrl_soc_data *data = NULL;
>  	const struct intel_pinctrl_soc_data **table;
>  	struct acpi_device *adev;
> +	const void *match;
>  	unsigned int i;
>  
>  	adev = ACPI_COMPANION(&pdev->dev);
> -	if (adev) {
> -		const void *match = device_get_match_data(&pdev->dev);
> -
> +	match = device_get_match_data(&pdev->dev);

Actually we don't even call intel_pinctrl_get_soc_data() if the ACPI ID
is not listed in the corresponding driver's module table. So I don't
think match can ever be NULL.

But feel free to prove me wrong ;-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ