Skip to content

Commit 7d60f98

Browse files
julianwiedmanngregkh
authored andcommitted
s390/qeth: don't dump past end of unknown HW header
[ Upstream commit 0ac1487 ] 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>
1 parent d5afd6b commit 7d60f98

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/s390/net/qeth_l2_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
484484
default:
485485
dev_kfree_skb_any(skb);
486486
QETH_CARD_TEXT(card, 3, "inbunkno");
487-
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
487+
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
488488
continue;
489489
}
490490
work_done++;

drivers/s390/net/qeth_l3_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card,
17931793
default:
17941794
dev_kfree_skb_any(skb);
17951795
QETH_CARD_TEXT(card, 3, "inbunkno");
1796-
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
1796+
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
17971797
continue;
17981798
}
17991799
work_done++;

0 commit comments

Comments
 (0)