linux/drivers/s390/net
Julian Wiedmann e82e90a1cb s390/qeth: fix length check in SNMP processing
commit 9a764c1e59 upstream.

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: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:54:15 +00:00
..
claw.c claw: replace PTR_RET with PTR_ERR_OR_ZERO 2014-04-28 13:44:10 -04:00
claw.h s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
ctcm_dbug.c s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
ctcm_dbug.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_fsms.c drivers/s390/net: removes unnecessary semicolon 2012-09-24 15:45:17 -04:00
ctcm_fsms.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_main.c ctc: replace PTR_RET with PTR_ERR_OR_ZERO 2014-04-28 13:44:10 -04:00
ctcm_main.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_mpc.c ctcm: remove BUG_ONs 2012-11-19 14:19:00 -05:00
ctcm_mpc.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_sysfs.c s390/net: fix format string mismatches 2014-05-30 17:35:23 -07:00
fsm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fsm.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
Kconfig qeth: Update Kconfig wording 2013-01-21 13:51:15 -05:00
lcs.c s390/net: fix format string mismatches 2014-05-30 17:35:23 -07:00
lcs.h s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
Makefile qeth: bridgeport support - basic control 2014-01-15 14:48:01 -08:00
netiucv.c netiucv: improve state checking in conn_action_txdone 2013-12-17 17:17:13 -05:00
qeth_core.h s390/qeth: don't clobber buffer on async TX completion 2018-11-20 18:05:31 +00:00
qeth_core_main.c s390/qeth: fix length check in SNMP processing 2019-02-11 17:54:15 +00:00
qeth_core_mpc.c qeth: bridgeport support - address notifications 2014-01-15 14:48:01 -08:00
qeth_core_mpc.h qeth: bridgeport support - address notifications 2014-01-15 14:48:01 -08:00
qeth_core_sys.c s390/qeth: unbreak OSM and OSN support 2017-09-15 18:29:34 +01:00
qeth_l2.h s390/qeth: unbreak OSM and OSN support 2017-09-15 18:29:34 +01:00
qeth_l2_main.c s390/qeth: invoke softirqs after napi_schedule() 2019-02-11 17:53:19 +00:00
qeth_l2_sys.c s390/qeth: unbreak OSM and OSN support 2017-09-15 18:29:34 +01:00
qeth_l3.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_l3_main.c s390/qeth: invoke softirqs after napi_schedule() 2019-02-11 17:53:19 +00:00
qeth_l3_sys.c s390: replace strict_strtoul() with kstrtoul() 2013-08-22 12:20:00 +02:00
smsgiucv.c smsgiucv: reestablish IUCV path after resume 2012-10-16 14:41:46 -04:00
smsgiucv.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
smsgiucv_app.c Driver core: driver_find() drops reference before returning 2012-01-24 16:00:34 -08:00