]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:18 +0000 (09:16 +0200)
commitd9057423312e9d12f02290cb97f14300330a729e
tree5526c005debff38340eba550091d7f96ca7cd027
parent85ebbc5a2543f3ffcc535dbeb9842af542f3edb1
net: sched: Add policy validation for tc attributes

[ Upstream commit 8b4c3cdd9dd8290343ce959a132d3b334062c5b9 ]

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: 5bc1701881e39 ("net: sched: introduce multichain support for filters")
Fixes: d47a6b0e7c492 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_api.c