diff options
| author | Anssi Hannula <anssi.hannula@bitwise.fi> | 2017-02-14 19:11:44 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-11-06 15:30:30 +0100 |
| commit | 23bd1e13cf0428fb80b41fc189ddcff6b3d296e8 (patch) | |
| tree | ff45e70a31e248f5d61487ee7954989f609b5bbc /drivers/tty/serial | |
| parent | 00f7b8ccd36a01feb85d2b8bab76d634a4c8f5a3 (diff) | |
net: xilinx_emaclite: fix receive buffer overflow
commit cd224553641848dd17800fe559e4ff5d208553e8 upstream.
xilinx_emaclite looks at the received data to try to determine the
Ethernet packet length but does not properly clamp it if
proto_type == ETH_P_IP or 1500 < proto_type <= 1518, causing a buffer
overflow and a panic via skb_panic() as the length exceeds the allocated
skb size.
Fix those cases.
Also add an additional unconditional check with WARN_ON() at the end.
Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Fixes: bb81b2ddfa19 ("net: add Xilinx emac lite device driver")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'drivers/tty/serial')
0 files changed, 0 insertions, 0 deletions
