Re: [PATCH net-next 1/3] genetlink: do not validate dump requests if there is no policy

From: Johannes Berg
Date: Thu May 02 2019 - 08:52:00 EST

On Thu, 2019-05-02 at 12:48 +0000, Michal Kubecek wrote:
> Unlike do requests, dump genetlink requests now perform strict validation
> by default even if the genetlink family does not set policy and maxtype
> because it does validation and parsing on its own (e.g. because it wants to
> allow different message format for different commands). While the null
> policy will be ignored, maxtype (which would be zero) is still checked so
> that any attribute will fail validation.
> The solution is to only call __nla_validate() from genl_family_rcv_msg()
> if family->maxtype is set.

D'oh. Which family was it that you found this on? I checked only ones
with policy I guess.

Reviewed-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>