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  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]
Date:   Fri, 22 Mar 2019 09:43:39 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@...el.com>,
        lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
        tiwai@...e.com, alsa-devel@...a-project.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH] ASoC: dapm: Fix NULL pointer dereference in
 snd_soc_dapm_free_kcontrol

On 3/22/19 7:30 AM, Pankaj Bharadiya wrote:
> w_text_param can be NULL and it is being dereferenced without checking.
> Add the missing sanity check to prevent  NULL pointer dereference.
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@...el.com>
> ---
>   sound/soc/soc-dapm.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 1ec06ef..67b032c 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -3957,6 +3957,10 @@ snd_soc_dapm_free_kcontrol(struct snd_soc_card *card,
>   	int count;
>   
>   	devm_kfree(card->dev, (void *)*private_value);
> +
> +	if (!w_param_text)
> +		return;

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>

next time, try using git format-patch -v2 to signal it's an updated 
version, it helps reviewers. Thanks!

> +
>   	for (count = 0 ; count < num_params; count++)
>   		devm_kfree(card->dev, (void *)w_param_text[count]);
>   	devm_kfree(card->dev, w_param_text);
> 

Powered by blists - more mailing lists