Skip to content

Commit 0ac1487

Browse files
julianwiedmanndavem330
authored andcommitted
s390/qeth: don't dump past end of unknown HW header
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aec45e8 commit 0ac1487

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/s390/net/qeth_l2_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
423423
default:
424424
dev_kfree_skb_any(skb);
425425
QETH_CARD_TEXT(card, 3, "inbunkno");
426-
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
426+
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
427427
continue;
428428
}
429429
work_done++;

drivers/s390/net/qeth_l3_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card,
13901390
default:
13911391
dev_kfree_skb_any(skb);
13921392
QETH_CARD_TEXT(card, 3, "inbunkno");
1393-
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
1393+
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
13941394
continue;
13951395
}
13961396
work_done++;

0 commit comments

Comments
 (0)