Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

2019-07-24 Thread David Ahern
On 7/23/19 1:57 AM, Thomas Haller wrote: > Does this flag and strict validation really provide any value? Commonly a > netlink message > is a plain TLV blob, and the meaning depends entirely on the policy. Strict checking enables kernel side filtering and other features that require passing attri

Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

2019-07-23 Thread Johannes Berg
On Tue, 2019-07-23 at 11:02 -0700, Stephen Hemminger wrote: > > There are some cases where netlink related to IPv4 does not send nested > flag. You risk breaking older iproute2 and other tools being used on newer > kernel. I.e this patch may break binary compatibility. Have you tried running > wit

Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

2019-07-23 Thread Stephen Hemminger
On Thu, 2 May 2019 16:15:10 +0200 (CEST) Michal Kubecek wrote: > Add new validation flag NL_VALIDATE_NESTED which adds three consistency > checks of NLA_F_NESTED_FLAG: > > - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy > - the flag is not set on attributes with other polici

Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

2019-07-23 Thread Thomas Haller
On Tue, 2019-07-23 at 11:09 +0200, Michal Kubecek wrote: > On Tue, Jul 23, 2019 at 10:57:54AM +0200, Thomas Haller wrote: > > Does this flag and strict validation really provide any value? > > Commonly a netlink message is a plain TLV blob, and the meaning > > depends entirely on the policy. > > >

Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

2019-07-23 Thread Michal Kubecek
On Tue, Jul 23, 2019 at 10:57:54AM +0200, Thomas Haller wrote: > Does this flag and strict validation really provide any value? > Commonly a netlink message is a plain TLV blob, and the meaning > depends entirely on the policy. > > What I mean is that for example > > NLA_PUT_U32 (msg, ATTR_IFIN

Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

2019-07-23 Thread Thomas Haller
On Thu, 2019-05-02 at 16:15 +0200, Michal Kubecek wrote: > Add new validation flag NL_VALIDATE_NESTED which adds three > consistency > checks of NLA_F_NESTED_FLAG: > > - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy > - the flag is not set on attributes with other policies exce