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] [day] [month] [year] [list]
Date: Sat, 23 Mar 2024 10:31:08 +0100
From: Takashi Iwai <tiwai@...e.de>
To: LuMingYin <lumingyindetect@....com>
Cc: linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	perex@...ex.cz,
	tiwai@...e.com,
	minhuadotchen@...il.com
Subject: Re: [PATCH] sound:Fix a memory leak in snd_ctl_elem_add_compat function

On Sat, 23 Mar 2024 10:27:12 +0100,
LuMingYin wrote:
> 
> In the function snd_ctl_elem_add_compat defined in /linux/sound/core/control_compat.c, a pointer named data is declared. This pointer allocates a block of dynamic memory using the kzalloc function at line 354. When the if statement at line 355 returns false, it indicates successful allocation of the dynamic memory area pointed to by data. However, when the if statements at lines 359 or 362 are true, the program will not execute the snd_ctl_elem_add(file, data, replace); operation at line 389 and will return directly. During this process, the dynamic memory area pointed to by data is neither freed nor used, leading to a memory leak bug. This commit fixes the aforementioned memory leak issue.
> 
> Signed-off-by: LuMingYin <lumingyindetect@....com>

Ditto as another mail, it's automatically freed.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ