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: Thu, 21 Mar 2024 12:20:49 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Takashi Iwai <tiwai@...e.com>
Cc: Jaroslav Kysela <perex@...ex.cz>, linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: control: fix memory leak in
 snd_ctl_elem_read_user()

On Thu, Mar 21, 2024 at 12:17:00PM -0400, Johannes Weiner wrote:
> With 6.9, I noticed kmalloc-2k blowing up to tens of gigabytes over
> several days. Kmemleak shows a long string of these:
> 
> unreferenced object 0xffff8f1bddbce800 (size 2048):
>   comm "wireplumber", pid 1058, jiffies 4294690193
>   hex dump (first 32 bytes):
>     14 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
>     4d 61 73 74 65 72 20 50 6c 61 79 62 61 63 6b 20  Master Playback
>   backtrace (crc bd965d91):
>     [<ffffffff85ac328b>] __kmalloc_node_track_caller+0x25b/0x370
>     [<ffffffff85a79375>] memdup_user+0x25/0x80
>     [<ffffffff85fa5d63>] snd_ctl_ioctl+0x753/0x880
>     [<ffffffff85b18119>] __x64_sys_ioctl+0x89/0xb0
>     [<ffffffff861ee190>] do_syscall_64+0x80/0x170
>     [<ffffffff862000ab>] entry_SYSCALL_64_after_hwframe+0x46/0x4e
> 
> When 1052d9882269 ("ALSA: control: Use automatic cleanup of kfree()")
> converted a few sites to automatic freeing, it removed the kfree from
> snd_ctl_elem_read_user() but forgot to add the __free hook.
> 
> Fixes: 1052d9882269 ("ALSA: control: Use automatic cleanup of kfree()")
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>

Oh, I just noticed there is a pending fix at

https://lore.kernel.org/linux-sound/20240320062722.31325-1-tiwai@suse.de/

Sorry about the noise!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ