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>
This commit is contained in:
parent
d5afd6b6ea
commit
7d60f98cde
@ -484,7 +484,7 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
|
||||
default:
|
||||
dev_kfree_skb_any(skb);
|
||||
QETH_CARD_TEXT(card, 3, "inbunkno");
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
|
||||
continue;
|
||||
}
|
||||
work_done++;
|
||||
|
@ -1793,7 +1793,7 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card,
|
||||
default:
|
||||
dev_kfree_skb_any(skb);
|
||||
QETH_CARD_TEXT(card, 3, "inbunkno");
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
|
||||
continue;
|
||||
}
|
||||
work_done++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user