diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-07-02 20:07:21 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-02 20:11:22 +0200 |
commit | 3450121997ce872eb7f1248417225827ea249710 (patch) | |
tree | bbd7f14e4712084862a80d35a3b52f87918fbb65 /arch | |
parent | 98482377dc7295d0c70e251925b7cc14aff4c5ac (diff) | |
download | linux-stable-3450121997ce872eb7f1248417225827ea249710.tar.gz linux-stable-3450121997ce872eb7f1248417225827ea249710.tar.bz2 linux-stable-3450121997ce872eb7f1248417225827ea249710.zip |
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>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions