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: <20200810150356.GL1793@kadam>
Date:   Mon, 10 Aug 2020 18:03:56 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Vaibhav Agarwal <vaibhav.sr@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alex Elder <elder@...nel.org>, Johan Hovold <johan@...nel.org>,
        Mark Greer <mgreer@...malcreek.com>,
        devel@...verdev.osuosl.org, greybus-dev@...ts.linaro.org,
        Colin Ian King <colin.king@...onical.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] staging: greybus: audio: fix uninitialized value issue

On Thu, Aug 06, 2020 at 09:51:57PM +0530, Vaibhav Agarwal wrote:
> diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
> index 2f9fdbdcd547..4b914d0edef2 100644
> --- a/drivers/staging/greybus/audio_topology.c
> +++ b/drivers/staging/greybus/audio_topology.c
> @@ -456,6 +456,13 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol,
>  	val = ucontrol->value.integer.value[0] & mask;
>  	connect = !!val;
>  
> +	ret = gb_pm_runtime_get_sync(bundle);
> +	if (ret)
> +		return ret;
> +
> +	ret = gb_audio_gb_get_control(module->mgmt_connection, data->ctl_id,
> +				      GB_AUDIO_INVALID_INDEX, &gbvalue);


We need to check "ret" after this.

> +
>  	/* update ucontrol */
>  	if (gbvalue.value.integer_value[0] != val) {
>  		for (wi = 0; wi < wlist->num_widgets; wi++) {
> @@ -466,16 +473,10 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol,

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ