1
0
Fork 0
alistair23-linux/net/netlink
Michal Kubecek 05d7f547be genetlink: do not validate dump requests if there is no policy
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.

Fixes: ef6243acb4 ("genetlink: optionally validate strictly/dumps")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-04 01:27:10 -04:00
..
Kconfig netlink: remove mmapped netlink support 2016-02-18 11:42:18 -05:00
Makefile netlink: Diag core and basic socket info dumping (v2) 2013-03-21 12:38:03 -04:00
af_netlink.c net: netlink: Check address length before reading groups field 2019-04-12 10:25:03 -07:00
af_netlink.h netlink: Add new socket option to enable strict checking on dumps 2018-10-08 10:39:04 -07:00
diag.c rhashtable: Change rhashtable_walk_start to return void 2017-12-11 09:58:38 -05:00
genetlink.c genetlink: do not validate dump requests if there is no policy 2019-05-04 01:27:10 -04:00