]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: validate length of param values
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2020 05:05:11 +0000 (21:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 06:17:43 +0000 (07:17 +0100)
commit52cd4f7f0223c13f1ea2b03ff41c219813afb691
treed68a734f8464db577af1433e569c0d2588afd0cb
parentb525831893120f1ab98a783d372c7cce05c9d643
devlink: validate length of param values

[ Upstream commit f0e3bb2cbbc453e34278879c879b72297dbd41b9 ]

DEVLINK_ATTR_PARAM_VALUE_DATA may have different types
so it's not checked by the normal netlink policy. Make
sure the attribute length is what we expect.

Fixes: f8e96eb1accb ("devlink: Add param set command")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/devlink.c