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: <87eeb8tquq.wl-kuninori.morimoto.gx@renesas.com>
Date:   05 Aug 2021 14:14:53 +0900
From:   Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To:     Samuel Holland <samuel@...lland.org>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: simple-card-utils: Avoid over-allocating DLCs


Hi Samuel

Thank you for your patch

> The allocation of the DAI link components (DLCs) passed the wrong
> pointer to sizeof. Since simple_dai_props is much larger than
> snd_soc_dai_link_component, there was no out of bounds access, only
> wasted memory.
> 
> Signed-off-by: Samuel Holland <samuel@...lland.org>
> ---

Wow indeed !
Thank you for your fixup

	Fixes: f2138aed231c8 ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
	Fixes: 050c7950fd706 ("ASoC: simple-card-utils: alloc dai_link information for CPU/Codec/Platform")
	Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>

>  sound/soc/generic/simple-card-utils.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
> index 677f7da93b4b..10c63b73900c 100644
> --- a/sound/soc/generic/simple-card-utils.c
> +++ b/sound/soc/generic/simple-card-utils.c
> @@ -640,8 +640,8 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv,
>  			cnf_num += li->num[i].codecs;
>  	}
>  
> -	dais = devm_kcalloc(dev, dai_num, sizeof(*dais),      GFP_KERNEL);
> -	dlcs = devm_kcalloc(dev, dlc_num, sizeof(*dai_props), GFP_KERNEL);
> +	dais = devm_kcalloc(dev, dai_num, sizeof(*dais), GFP_KERNEL);
> +	dlcs = devm_kcalloc(dev, dlc_num, sizeof(*dlcs), GFP_KERNEL);
>  	if (!dais || !dlcs)
>  		return -ENOMEM;
>  
> -- 
> 2.31.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ