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

Commit 5b3e7e6c authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

openvswitch: potential NULL deref in sample()



If there is no OVS_SAMPLE_ATTR_ACTIONS set then "acts_list" is NULL and
it leads to a NULL dereference when we call nla_len(acts_list).  This
is a static checker fix, not something I have seen in testing.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 563d34d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -325,6 +325,9 @@ static int sample(struct datapath *dp, struct sk_buff *skb,
		}
	}

	if (!acts_list)
		return 0;

	return do_execute_actions(dp, skb, nla_data(acts_list),
						 nla_len(acts_list), true);
}