When actions is NULL and action_len is not zero, it would
potentially allow format_odp_actions() to dereference the
NULL pointer. The fix will check for valid actions pointer
only, as format_odp_actions() will handle a zero length.
Fixes: cdee00fd635d ("datapath: Replace "struct odp_action" by Netlink
attributes.")
Signed-off-by: Eelco Chaudron <[email protected]>
---
lib/dpif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dpif.c b/lib/dpif.c
index ab633fd27..245c8b5ee 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -1810,7 +1810,7 @@ log_flow_message(const struct dpif *dpif, int error,
ds_put_cstr(&ds, ", ");
dpif_flow_stats_format(stats, &ds);
}
- if (actions || actions_len) {
+ if (actions) {
ds_put_cstr(&ds, ", actions:");
format_odp_actions(&ds, actions, actions_len, NULL);
}
--
2.46.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev