diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2019-07-22 21:43:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-09 17:53:33 +0200 |
commit | 7fcc60e5f837e7f626e08b486697017953e7e6a0 (patch) | |
tree | d3fcc11dc047238f3c3f64f49460ed73859f4a80 /net/sched | |
parent | 12f036d9ebc833fb9154cb7f3fa51cc8e2635a13 (diff) | |
download | linux-stable-7fcc60e5f837e7f626e08b486697017953e7e6a0.tar.gz linux-stable-7fcc60e5f837e7f626e08b486697017953e7e6a0.tar.bz2 linux-stable-7fcc60e5f837e7f626e08b486697017953e7e6a0.zip |
ife: error out when nla attributes are empty
[ Upstream commit c8ec4632c6ac9cda0e8c3d51aa41eeab66585bd5 ]
act_ife at least requires TCA_IFE_PARMS, so we have to bail out
when there is no attribute passed in.
Reported-by: syzbot+fbb5b288c9cb6a2eeac4@syzkaller.appspotmail.com
Fixes: ef6980b6becb ("introduce IFE action")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_ife.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c index 31de26c99023..16a403d17f44 100644 --- a/net/sched/act_ife.c +++ b/net/sched/act_ife.c @@ -459,6 +459,9 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla, int ret = 0; int err; + if (!nla) + return -EINVAL; + err = nla_parse_nested(tb, TCA_IFE_MAX, nla, ife_policy, NULL); if (err < 0) return err; |