mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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: 4e54795a27
("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>
This commit is contained in:
parent
8750939b6a
commit
ff3b63b8c2
@ -5958,6 +5958,8 @@ static const struct nla_policy devlink_nl_policy[DEVLINK_ATTR_MAX + 1] = {
|
||||
[DEVLINK_ATTR_PARAM_VALUE_CMODE] = { .type = NLA_U8 },
|
||||
[DEVLINK_ATTR_REGION_NAME] = { .type = NLA_NUL_STRING },
|
||||
[DEVLINK_ATTR_REGION_SNAPSHOT_ID] = { .type = NLA_U32 },
|
||||
[DEVLINK_ATTR_REGION_CHUNK_ADDR] = { .type = NLA_U64 },
|
||||
[DEVLINK_ATTR_REGION_CHUNK_LEN] = { .type = NLA_U64 },
|
||||
[DEVLINK_ATTR_HEALTH_REPORTER_NAME] = { .type = NLA_NUL_STRING },
|
||||
[DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD] = { .type = NLA_U64 },
|
||||
[DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER] = { .type = NLA_U8 },
|
||||
|
Loading…
Reference in New Issue
Block a user