Skip to content
Commit e3047859 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

lpc_eth: add missing ndo_change_mtu()



lpc_eth does a copy of transmitted skbs to DMA area, without checking
skb lengths, so can trigger buffer overflows :

memcpy(pldat->tx_buff_v + txidx * ENET_MAXF_SIZE, skb->data, len);

One way to get bigger skbs is to allow MTU changes above the 1500 limit.

Calling eth_change_mtu() in ndo_change_mtu() makes sure this cannot
happen.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Kevin Wells <kevin.wells@nxp.com>
Acked-by: default avatarRoland Stigge <stigge@antcom.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed6be3dc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment