qeth: avoid buffer overflow in snmp ioctl
authorUrsula Braun <ursula.braun@de.ibm.com>
Wed, 6 Nov 2013 08:04:52 +0000 (09:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 18:56:37 +0000 (10:56 -0800)
commit9dc2f267425869786d195a99eadbc2aad3f4edaa
tree4f02df55e0f49f8406ff49bc1b8e677b853e8e4e
parente6a159898766541f6ed3bb48fe45dbba19ffa7eb
qeth: avoid buffer overflow in snmp ioctl

commit 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 upstream.

Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.com>
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/net/qeth_core_main.c