]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_simple: fix parsing of TCA_DEF_DATA
authorDavide Caratti <dcaratti@redhat.com>
Fri, 8 Jun 2018 03:02:31 +0000 (05:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jun 2018 22:49:19 +0000 (18:49 -0400)
commitb7f9db1cebc7ccba173e34a3fa39181b64f4cdf9
treeeaf7ec1426a9c9625b43711b6578109f22358ffc
parent87929beb9bea5c794a93003d7ed34e3f599c39ea
net/sched: act_simple: fix parsing of TCA_DEF_DATA

use nla_strlcpy() to avoid copying data beyond the length of TCA_DEF_DATA
netlink attribute, in case it is less than SIMP_MAX_DATA and it does not
end with '\0' character.

v2: fix errors in the commit message, thanks Hangbin Liu

Fixes: de4be0a909ae ("net_cls_act: Make act_simple use of netlink policy.")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_simple.c