]> git.ipfire.org Git - people/arne_f/kernel.git/commit
devlink: validate length of region addr/len
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2020 05:05:12 +0000 (21:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 06:14:18 +0000 (07:14 +0100)
commit48aea14b8840a60662bac14f670ea4e265c546c8
tree93eb4f7bebf8ccc64aef3ed496c6a7c93ca3f600
parent3c2893a77cef0b05127c2d5c21cf08e19904b092
devlink: validate length of region addr/len

[ Upstream commit ff3b63b8c299b73ac599b120653b47e275407656 ]

DEVLINK_ATTR_REGION_CHUNK_ADDR and DEVLINK_ATTR_REGION_CHUNK_LEN
lack entries in the netlink policy. Corresponding nla_get_u64()s
may read beyond the end of the message.

Fixes: 4e54795a27f5 ("devlink: Add support for region snapshot read 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