summaryrefslogtreecommitdiff
path: root/include/scsi/sas.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-02 20:07:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-10 09:54:39 +0200
commit37eaa74451c1003a6bec548c957890c264559463 (patch)
tree289ce0b4223b6353f83c0912292eb3b1dba61eca /include/scsi/sas.h
parenta75995a7554c78ab77e01ef80714714e65834638 (diff)
ALSA: line6: Fix write on zero-sized buffer
commit 3450121997ce872eb7f1248417225827ea249710 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/scsi/sas.h')
0 files changed, 0 insertions, 0 deletions