This Linux kernel change "ife: error out when nla attributes are empty" is included in the Linux 4.9.189 release. This change is authored by Cong Wang <xiyou.wangcong [at] gmail.com> on Mon Jul 22 21:43:00 2019 -0700. The commit for this change in Linux stable tree is 264e020 (patch) which is from upstream commit c8ec463. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream c8ec463.
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: email@example.com Fixes: ef6980b6becb ("introduce IFE action") Cc: Jamal Hadi Salim <firstname.lastname@example.org> Cc: Jiri Pirko <email@example.com> Signed-off-by: Cong Wang <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com> Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>
There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
net/sched/act_ife.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c index d2932dc..36e4dcd 100644 --- a/net/sched/act_ife.c +++ b/net/sched/act_ife.c @@ -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;