Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Jakub Kicinski
On Fri, 4 Oct 2019 16:23:40 -0700, Cong Wang wrote: > On Fri, Oct 4, 2019 at 3:54 PM Jakub Kicinski wrote: > > On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > > > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > > > Applied, queued for 4.14+, thanks! > >

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Cong Wang
On Fri, Oct 4, 2019 at 3:54 PM Jakub Kicinski wrote: > > On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > > Applied, queued for 4.14+, thanks! > > > > Ahm, this breaks some user applications. > > > > I'm getti

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-04 Thread Jakub Kicinski
On Thu, 3 Oct 2019 16:45:25 -0300, Marcelo Ricardo Leitner wrote: > On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > > Applied, queued for 4.14+, thanks! > > Ahm, this breaks some user applications. > > I'm getting "Attribute failed policy validation" extack error while > addin

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-10-03 Thread Marcelo Ricardo Leitner
On Sat, Sep 21, 2019 at 07:24:34PM -0700, Jakub Kicinski wrote: > On Wed, 18 Sep 2019 22:15:24 -0700, Cong Wang wrote: > > On Wed, Sep 18, 2019 at 7:41 PM David Ahern wrote: > > > On 9/18/19 5:24 PM, Cong Wang wrote: > > > > The TCA_KIND attribute is of NLA_STRING which does not check > > > > th

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-21 Thread Jakub Kicinski
On Wed, 18 Sep 2019 22:15:24 -0700, Cong Wang wrote: > On Wed, Sep 18, 2019 at 7:41 PM David Ahern wrote: > > On 9/18/19 5:24 PM, Cong Wang wrote: > > > The TCA_KIND attribute is of NLA_STRING which does not check > > > the NUL char. KMSAN reported an uninit-value of TCA_KIND which > > > is like

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread Jiri Pirko
Thu, Sep 19, 2019 at 01:24:12AM CEST, xiyou.wangc...@gmail.com wrote: >The TCA_KIND attribute is of NLA_STRING which does not check >the NUL char. KMSAN reported an uninit-value of TCA_KIND which >is likely caused by the lack of NUL. > >Change it to NLA_NUL_STRING and add a max len too. > >Fixes: 8

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread Cong Wang
On Wed, Sep 18, 2019 at 7:41 PM David Ahern wrote: > > On 9/18/19 5:24 PM, Cong Wang wrote: > > The TCA_KIND attribute is of NLA_STRING which does not check > > the NUL char. KMSAN reported an uninit-value of TCA_KIND which > > is likely caused by the lack of NUL. > > > > Change it to NLA_NUL_STRI

Re: [Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread David Ahern
On 9/18/19 5:24 PM, Cong Wang wrote: > The TCA_KIND attribute is of NLA_STRING which does not check > the NUL char. KMSAN reported an uninit-value of TCA_KIND which > is likely caused by the lack of NUL. > > Change it to NLA_NUL_STRING and add a max len too. > > Fixes: 8b4c3cdd9dd8 ("net: sched:

[Patch net] net_sched: add max len check for TCA_KIND

2019-09-18 Thread Cong Wang
The TCA_KIND attribute is of NLA_STRING which does not check the NUL char. KMSAN reported an uninit-value of TCA_KIND which is likely caused by the lack of NUL. Change it to NLA_NUL_STRING and add a max len too. Fixes: 8b4c3cdd9dd8 ("net: sched: Add policy validation for tc attributes") Reported-