]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usx2y: Fix potential leaks of uninitialized memory
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 May 2021 13:15:38 +0000 (15:15 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 May 2021 14:04:10 +0000 (16:04 +0200)
commita2081f8581c138f26cb814d77fc25e5fe1a29789
treed739e23399bb1edb4774a6b005ceaab388f33ded
parent7af47f45a9dad1c818e5aceff35ce0da03fec5d2
ALSA: usx2y: Fix potential leaks of uninitialized memory

usx2y drivers may expose the allocated pages via mmap, but it performs
zero-clear only for the struct size, not aligned with the page size.
This leaves out some uninitialized trailing bytes.

This patch fixes the clearance to cover all memory that are exposed to
user-space.

Link: https://lore.kernel.org/r/20210517131545.27252-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/usx2y/usX2Yhwdep.c
sound/usb/usx2y/usbus428ctldefs.h
sound/usb/usx2y/usbusx2y.c
sound/usb/usx2y/usx2yhwdeppcm.c