WSL2-Linux-Kernel/drivers/s390/net
Julian Wiedmann 9a764c1e59 s390/qeth: fix length check in SNMP processing
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>
2018-11-28 11:16:54 -08:00
..
Kconfig s390/ism: add device driver for internal shared memory 2018-06-30 20:42:26 +09:00
Makefile s390/ism: add device driver for internal shared memory 2018-06-30 20:42:26 +09:00
ctcm_dbug.c
ctcm_dbug.h
ctcm_fsms.c
ctcm_fsms.h
ctcm_main.c
ctcm_main.h
ctcm_mpc.c
ctcm_mpc.h
ctcm_sysfs.c
fsm.c
fsm.h
ism.h s390/ism: add device driver for internal shared memory 2018-06-30 20:42:26 +09:00
ism_drv.c s390/ism: clear dmbe_mask bit before SMC IRQ handling 2018-11-14 14:21:20 -08:00
lcs.c
lcs.h
netiucv.c
qeth_core.h s390/qeth: sanitize ARP requests 2018-11-03 10:44:06 -07:00
qeth_core_main.c s390/qeth: fix length check in SNMP processing 2018-11-28 11:16:54 -08:00
qeth_core_mpc.c s390: qeth: Fix potential array overrun in cmd/rc lookup 2018-09-28 10:27:26 -07:00
qeth_core_mpc.h s390/qeth: report 25Gbit link speed 2018-11-03 10:44:06 -07:00
qeth_core_sys.c s390/qeth: remove duplicated carrier state tracking 2018-09-26 09:56:08 -07:00
qeth_l2.h s390/qeth: clean up exported symbols 2018-07-12 16:42:39 -07:00
qeth_l2_main.c s390/qeth: fix initial operstate 2018-11-03 10:44:05 -07:00
qeth_l2_sys.c
qeth_l3.h
qeth_l3_main.c s390/qeth: sanitize ARP requests 2018-11-03 10:44:06 -07:00
qeth_l3_sys.c s390/qeth: allocate netdevice early 2018-07-21 10:12:29 -07:00
smsgiucv.c
smsgiucv.h
smsgiucv_app.c