Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 264e020e authored by Cong Wang's avatar Cong Wang Committed by Greg Kroah-Hartman
Browse files

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: default avatar <syzbot+fbb5b288c9cb6a2eeac4@syzkaller.appspotmail.com>
Fixes: ef6980b6 ("introduce IFE action")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dfb98836
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;