]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: Add policy validation for tc attributes
authorDavid Ahern <dsahern@gmail.com>
Wed, 3 Oct 2018 22:05:36 +0000 (15:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 21:26:44 +0000 (14:26 -0700)
commit5e953f771b1519aa0d2376649aca9c09bc5760b3
tree11f2cdafb6a217858f0fa1f273bb26cc919be840
parent89e73a6f53adb6cf2f85ff8e5477588413cfe36d
net: sched: Add policy validation for tc attributes

A number of TC attributes are processed without proper validation
(e.g., length checks). Add a tca policy for all input attributes and use
when invoking nlmsg_parse.

The 2 Fixes tags below cover the latest additions. The other attributes
are a string (KIND), nested attribute (OPTIONS which does seem to have
validation in most cases), for dumps only or a flag.

Fixes: 78526a0e48a9a ("net: sched: introduce multichain support for filters")
Fixes: 2b04c04f5c06d ("net: sched: introduce ingress/egress block index attributes for qdisc")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c