mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ife: error out when nla attributes are empty
[ Upstream commitc8ec4632c6] 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:ef6980b6be("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dfb98836f9
commit
264e020e26
@@ -477,6 +477,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);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user