]> git.ipfire.org Git - people/ms/linux.git/commit
be2iscsi: check ip buffer before copying
authorMike Christie <michaelc@cs.wisc.edu>
Mon, 29 Sep 2014 18:55:41 +0000 (13:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:43:07 +0000 (09:43 -0700)
commit17b48b83ce69a3f9e934c0dad178a79a9277b738
treeb70651e581c2f2141c68f10884471bb87a86942e
parentcd487ab059f0875c892e5ffbcff97ca88dc6ff33
be2iscsi: check ip buffer before copying

commit a41a9ad3bbf61fae0b6bfb232153da60d14fdbd9 upstream.

Dan Carpenter found a issue where be2iscsi would copy the ip
from userspace to the driver buffer before checking the len
of the data being copied:
http://marc.info/?l=linux-scsi&m=140982651504251&w=2

This patch just has us only copy what we the driver buffer
can support.

Tested-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/be2iscsi/be_mgmt.c