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]
Date:   Fri, 05 Jul 2019 09:37:14 -0700
From:   Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>
To:     Wei Yongjun <weiyongjun1@...wei.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Pan Xiuli <xiuli.pan@...ux.intel.com>
Cc:     kernel-janitors@...r.kernel.org, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH -next] ASoC: SOF: debug: fix possible
 memory leak in sof_dfsentry_write()

On Fri, 2019-07-05 at 08:16 +0000, Wei Yongjun wrote:
> 'string' is malloced in sof_dfsentry_write() and should be freed
> before leaving from the error handling cases, otherwise it will cause
> memory leak.
> 
> Fixes: 091c12e1f50c ("ASoC: SOF: debug: add new debugfs entries for
> IPC flood test")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
Thanks for fixing this, Wei!
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>

> ---
>  sound/soc/sof/debug.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
> index 54bb53bfc81b..2388477a965e 100644
> --- a/sound/soc/sof/debug.c
> +++ b/sound/soc/sof/debug.c
> @@ -162,7 +162,7 @@ static ssize_t sof_dfsentry_write(struct file
> *file, const char __user *buffer,
>  	else
>  		ret = kstrtoul(string, 0, &ipc_count);
>  	if (ret < 0)
> -		return ret;
> +		goto out;
>  
>  	/* limit max duration/ipc count for flood test */
>  	if (flood_duration_test) {
> @@ -191,7 +191,7 @@ static ssize_t sof_dfsentry_write(struct file
> *file, const char __user *buffer,
>  				    "error: debugfs write failed to
> resume %d\n",
>  				    ret);
>  		pm_runtime_put_noidle(sdev->dev);
> -		return ret;
> +		goto out;
>  	}
>  
>  	/* flood test */
> 
> 
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@...a-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ