s390/qeth: don't dump past end of unknown HW header
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 12 Sep 2018 13:31:35 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:53:22 +0000 (08:53 +0200)
commit82e9788a693456aa47c5ef67654a4ba66cdd9ef2
tree0d0e06936c9c3c34238baac483a20a97f4e1c65c
parent743f4a27e13ee967181626e3dd756fcc8fb4690e
s390/qeth: don't dump past end of unknown HW header

[ Upstream commit 0ac1487c4b2de383b91ecad1be561b8f7a2c15f4 ]

For inbound data with an unsupported HW header format, only dump the
actual HW header. We have no idea how much payload follows it, and what
it contains. Worst case, we dump past the end of the Inbound Buffer and
access whatever is located next in memory.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c