Skip to content

Commit

Permalink
ofproto-dpif-upcall: Fix action attr iteration.
Browse files Browse the repository at this point in the history
This calls is operating on messages generated by the datapath. If a
datapath implementation sends improperly formatted netlink attributes,
then it's possible for a revalidator thread to end up trapped in an
infinite loop iterating across the actions attributes. Rather than using
the UNSAFE variation of this iterator, use the regular version.

Fixes: e672ff9 ("ofproto-dpif: Restore metadata and registers on recirculation.")
Signed-off-by: Joe Stringer <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
joestringer committed Aug 7, 2017
1 parent cf62c33 commit 55f854b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ ukey_create_from_dpif_flow(const struct udpif *udpif,
return EINVAL;
}
}
NL_ATTR_FOR_EACH_UNSAFE (a, left, flow->actions, flow->actions_len) {
NL_ATTR_FOR_EACH (a, left, flow->actions, flow->actions_len) {
if (nl_attr_type(a) == OVS_ACTION_ATTR_RECIRC) {
return EINVAL;
}
Expand Down

0 comments on commit 55f854b

Please sign in to comment.