On Tue, 2017-02-07 at 15:57 -0500, Willem de Bruijn wrote: > From: Willem de Bruijn <will...@google.com> > > The stack must not pass packets to device drivers that are shorter > than the minimum link layer header length. > > Previously, packet sockets would drop packets smaller than or equal > to dev->hard_header_len, but this has false positives. Zero length > payload is used over Ethernet. Other link layer protocols support > variable length headers. Support for validation of these protocols > removed the min length check for all protocols. > > Introduce an explicit dev->min_header_len parameter and drop all > packets below this value. Initially, set it to non-zero only for > Ethernet and loopback. Other protocols can follow in a patch to > net-next. > > Fixes: 9ed988cd5915 ("packet: validate variable length ll headers") > Reported-by: Sowmini Varadhan <sowmini.varad...@oracle.com> > Signed-off-by: Willem de Bruijn <will...@google.com> > ---
Acked-by: Eric Dumazet <eduma...@google.com>