From: Dennis Dalessandro Date: Thu, 20 Feb 2014 16:02:53 +0000 (-0500) Subject: IB/ipath: Fix potential buffer overrun in sending diag packet routine X-Git-Tag: v3.2.58~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9782df2240b10ebc8df587e5a7f574ef9f44f71;p=pandora-kernel.git IB/ipath: Fix potential buffer overrun in sending diag packet routine commit a2cb0eb8a64adb29a99fd864013de957028f36ae upstream. Guard against a potential buffer overrun. The size to read from the user is passed in, and due to the padding that needs to be taken into account, as well as the place holder for the ICRC it is possible to overflow the 32bit value which would cause more data to be copied from user space than is allocated in the buffer. Reported-by: Nico Golde Reported-by: Fabian Yamaguchi Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Roland Dreier Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed