linux-stable/drivers/s390
Julian Wiedmann eb09c6dbe4 s390/qeth: fix length check in SNMP processing
[ Upstream commit 9a764c1e59 ]

The response for a SNMP request can consist of multiple parts, which
the cmd callback stages into a kernel buffer until all parts have been
received. If the callback detects that the staging buffer provides
insufficient space, it bails out with error.
This processing is buggy for the first part of the response - while it
initially checks for a length of 'data_len', it later copies an
additional amount of 'offsetof(struct qeth_snmp_cmd, data)' bytes.

Fix the calculation of 'data_len' for the first part of the response.
This also nicely cleans up the memcpy code.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:41:17 +01:00
..
block s390/scm_blk: correct numa_node in scm_blk_dev_setup 2018-10-03 17:00:49 -07:00
char s390: introduce execute-trampolines for branches 2018-04-29 11:33:15 +02:00
cio s390/cio: Fix how vfio-ccw checks pinned pages 2018-10-18 09:16:23 +02:00
crypto s390/zcrypt: Fix wrong comparison leading to strange load balancing 2018-02-03 17:38:59 +01:00
net s390/qeth: fix length check in SNMP processing 2018-12-05 19:41:17 +01:00
scsi scsi: zfcp: assert that the ERP lock is held when tracing a recovery trigger 2018-08-03 07:50:32 +02:00
virtio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-05-16 09:24:44 -07:00
Makefile