]> 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)
commit4e55b3d9650e4c18341945e76620619e2765e5c5
treee71ad398f27acf146bb2662be545beed64628fa8
parent5b3c0035689017711348d88d7eab5e6a70af8f54
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: dc953f39e74c ("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