]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2020 21:28:48 +0000 (13:28 -0800)
commit4acdbaa5ddb7ba5e360ded70d35f651a94e11317
treee71ad398f27acf146bb2662be545beed64628fa8
parentf0e3bb2cbbc453e34278879c879b72297dbd41b9
devlink: validate length of region addr/len

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: b41666a9e71d ("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>
net/core/devlink.c