diff options
author | Jakub Kicinski <kuba@kernel.org> | 2025-05-09 14:27:51 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-12 18:50:09 -0700 |
commit | a96876057b9e44f60d936f8e4887543555b0593c (patch) | |
tree | acc4f291ffe0f9afd17a7464327dfcd4a3a1e237 /include/net/netlink.h | |
parent | cc42263172bed7f085d143c6977b392c13a4e279 (diff) |
netlink: fix policy dump for int with validation callback
Recent devlink change added validation of an integer value
via NLA_POLICY_VALIDATE_FN, for sparse enums. Handle this
in policy dump. We can't extract any info out of the callback,
so report only the type.
Fixes: 429ac6211494 ("devlink: define enum for attr types of dynamic attributes")
Reported-by: syzbot+01eb26848144516e7f0a@syzkaller.appspotmail.com
Link: https://patch.msgid.link/20250509212751.1905149-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r-- | include/net/netlink.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index 82e07e272290..90a560dc167a 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -321,7 +321,13 @@ enum nla_policy_validation { * All other Unused - but note that it's a union * * Meaning of `validate' field, use via NLA_POLICY_VALIDATE_FN: + * NLA_U8, NLA_U16, + * NLA_U32, NLA_U64, + * NLA_S8, NLA_S16, + * NLA_S32, NLA_S64, + * NLA_MSECS, * NLA_BINARY Validation function called for the attribute. + * * All other Unused - but note that it's a union * * Example: |