Home
last modified time | relevance | path

Searched hist:34501219 (Results 1 – 1 of 1) sorted by relevance

/linux/sound/usb/line6/
H A Dpcm.cdiff 34501219 Tue Jul 02 18:07:21 GMT 2019 Takashi Iwai <tiwai@suse.de> ALSA: line6: Fix write on zero-sized buffer

LINE6 drivers allocate the buffers based on the value returned from
usb_maxpacket() calls. The manipulated device may return zero for
this, and this results in the kmalloc() with zero size (and it may
succeed) while the other part of the driver code writes the packet
data with the fixed size -- which eventually overwrites.

This patch adds a simple sanity check for the invalid buffer size for
avoiding that problem.

Reported-by: syzbot+219f00fb49874dcaea17@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>