netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC net-next 0/4] net/sched: cls_flower: avoid false matching of truncated packets
@ 2017-04-28 12:00 Simon Horman
  2017-04-28 12:00 ` [PATCH/RFC net-next 1/4] flow dissector: return error on port dissection under-run Simon Horman
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Simon Horman @ 2017-04-28 12:00 UTC (permalink / raw)
  To: Jiri Pirko, Jamal Hadi Salim, Cong Wang
  Cc: Dinan Gunawardena, netdev, oss-drivers

Hi,

this series is intended to avoid false-positives which match
truncated packets against flower classifiers which match on:
* zero L4 ports or;
* zero ICMP code or type

This requires updating the flow dissector to return an error in such cases
and updating flower to not match on the result of a failed dissection.

In the case of UDP this results in a behavioural change to users of
flow_keys_dissector_keys[] and flow_keys_dissector_symmetric_keys[] -
dissection will fail on truncated packets where the IP protocol of the
packets indicates ports should be present (according to skb_flow_get_ports()).

The last patch of the series builds on the above to allow users to specify
a policy for how to handle packets whose dissection fails.

I will separately provide RFC patches to iproute2 to allow exercising the
last patch.


Simon Horman (4):
  flow dissector: return error on port dissection under-run
  flow dissector: return error on icmp dissection under-run
  net/sched: cls_flower: do not match if dissection fails
  net/sched: cls_flower: allow control of tree traversal on packet parse
    errors

 include/linux/skbuff.h       |  11 +++--
 include/uapi/linux/pkt_cls.h |   2 +
 net/core/flow_dissector.c    | 105 ++++++++++++++++++++++++-------------------
 net/sched/cls_flower.c       |  47 ++++++++++++++-----
 4 files changed, 107 insertions(+), 58 deletions(-)

-- 
2.12.2.816.g2cccc81164

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-05-02 12:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 12:00 [PATCH/RFC net-next 0/4] net/sched: cls_flower: avoid false matching of truncated packets Simon Horman
2017-04-28 12:00 ` [PATCH/RFC net-next 1/4] flow dissector: return error on port dissection under-run Simon Horman
2017-04-28 12:00 ` [PATCH/RFC net-next 2/4] flow dissector: return error on icmp " Simon Horman
2017-04-28 12:00 ` [PATCH/RFC net-next 3/4] net/sched: cls_flower: do not match if dissection fails Simon Horman
2017-04-28 12:00 ` [PATCH/RFC net-next 4/4] net/sched: cls_flower: allow control of tree traversal on packet parse errors Simon Horman
2017-04-28 12:52 ` [PATCH/RFC net-next 0/4] net/sched: cls_flower: avoid false matching of truncated packets Jamal Hadi Salim
2017-04-28 13:11   ` Simon Horman
2017-04-28 13:41     ` Jamal Hadi Salim
2017-04-28 14:14       ` Simon Horman
2017-04-30 13:51         ` Jamal Hadi Salim
2017-04-30 14:45           ` Jamal Hadi Salim
2017-05-01 10:36           ` Simon Horman
2017-05-02  1:35             ` Jamal Hadi Salim
2017-05-02 12:04               ` [oss-drivers] " Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).