]> git.baikalelectronics.ru Git - kernel.git/commit
via-velocity: unconditionally drop frames with bad l2 length
authorTimo Teräs <timo.teras@iki.fi>
Mon, 16 Nov 2015 12:36:32 +0000 (14:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Nov 2015 19:37:16 +0000 (14:37 -0500)
commit02c95f0673ead06d4d70c27b93fef4cdd3de8214
treed9e2e25169454d4c8c64b5ce9eae52f3407b099f
parentb5ca9701fedc9198d6174001297d16dcb8ea51c2
via-velocity: unconditionally drop frames with bad l2 length

By default the driver allowed incorrect frames to be received. What is
worse the code does not handle very short frames correctly. The FCS
length is unconditionally subtracted, and the underflow can cause
skb_put to be called with large number after implicit cast to unsigned.
And indeed, an skb_over_panic() was observed with via-velocity.

This removes the module parameter as it does not work in it's
current state, and should be implemented via NETIF_F_RXALL if needed.

Suggested-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/via/via-velocity.c