From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Davide Caratti <dcaratti@redhat.com>,
Jiri Pirko <jiri@resnulli.us>,
Cong Wang <xiyou.wangcong@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions
Date: Mon, 22 Oct 2018 14:39:15 -0400 [thread overview]
Message-ID: <e690cb84-7568-c534-fdb8-bea196165e9a@mojatatu.com> (raw)
In-Reply-To: <cover.1540070509.git.dcaratti@redhat.com>
On 2018-10-20 5:33 p.m., Davide Caratti wrote:
> the following command:
>
> # tc actions add action police rate 1mbit burst 1k conform-exceed \
> > pass / goto chain 42
>
> generates a NULL pointer dereference when packets exceed the configured
> rate. Similarly, the following command:
>
> # tc actions add action pass random determ goto chain 42 2
>
> makes the kernel crash with NULL dereference when the first packet does
> not match the 'pass' action.
>
> gact and police allow users to specify a fallback control action, that is
> stored in the action private data. 'goto chain x' never worked for these
> cases, since a->goto_chain handle was never initialized. There is only one
> goto_chain handle per TC action, and it is designed to be non-NULL only if
> tcf_action contains a 'goto chain' command. So, let's forbid 'goto chain'
> on fallback actions.
>
> Patch 1/4 and 2/4 change the .init() functions of police and gact, to let
> them return an error when users try to set 'goto chain x' in the fallback
> action. Patch 3/4 and 4/4 add TDC selftest coverage to this new behavior.
>
For the series,
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
cheers,
jamal
next prev parent reply other threads:[~2018-10-23 2:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 21:33 [PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions Davide Caratti
2018-10-20 21:33 ` [PATCH net 1/4] net/sched: act_gact: disallow 'goto chain' on fallback control action Davide Caratti
2018-10-22 16:22 ` Cong Wang
2018-10-22 20:55 ` Jiri Pirko
2018-10-20 21:33 ` [PATCH net 2/4] net/sched: act_police: " Davide Caratti
2018-10-22 16:23 ` Cong Wang
2018-10-22 20:57 ` Jiri Pirko
2018-10-20 21:33 ` [PATCH net 3/4] tc-tests: test denial of 'goto chain' on 'random' traffic in gact.json Davide Caratti
2018-10-20 21:33 ` [PATCH net 4/4] tc-tests: test denial of 'goto chain' for exceed traffic in police.json Davide Caratti
2018-10-22 18:39 ` Jamal Hadi Salim [this message]
2018-10-23 2:43 ` [PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e690cb84-7568-c534-fdb8-bea196165e9a@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).