Messages in this thread | | | Date | Sun, 23 Jul 2023 17:48:46 +0800 (GMT+08:00) | From | "Lin Ma" <> | Subject | Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check |
| |
> Sure, that is another undergoing task I'm working on. If the nlattr is parsed with > NL_VALIDATE_UNSPEC, any forgotten nlattr will be rejected, therefore (which is the default > for modern nla_parse).
For the general netlink interface, the deciding flag should be genl_ops.validate defined in each ops. The default validate flag is strict, while the developer can overwrite the flag with GENL_DONT_VALIDATE_STRICT to ease the validation. That is to say, safer code should enforce NL_VALIDATE_STRICT by not overwriting the validate flag.
Regrads Lin
| |