]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:11:12 +0000 (15:11 +0100)
commit557e6425d7abb2b9766aaa512aaf85714189a51d
tree6ef3418a605f33d7b25acea28d3b7613dae4d5ae
parenta0b8d8d906d267987d507138003048c5fdf77473
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: Jiri Slaby <jslaby@suse.cz>
drivers/scsi/be2iscsi/be_mgmt.c