diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index 7fcbda4..76368ac 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -3551,7 +3551,7 @@ index 57d5159b61..ecf539b736 100644 bool filter_zone; uint16_t zone; diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c -index 5d2635946d..3a8068b12c 100644 +index 5d2635946d..eeb0e3851c 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -820,6 +820,7 @@ check_condition(const struct ovsdb_idl_table_class *table, @@ -3562,7 +3562,33 @@ index 5d2635946d..3a8068b12c 100644 goto out; } -@@ -1374,6 +1375,7 @@ set_column(const struct ovsdb_idl_table_class *table, +@@ -830,14 +831,10 @@ check_condition(const struct ovsdb_idl_table_class *table, + } else { + struct ovsdb_datum a; + ++ ovsdb_datum_init_empty(&a); + if (found) { + a.n = 1; + a.keys = &have_datum->values[idx]; +- a.values = NULL; +- } else { +- a.n = 0; +- a.keys = NULL; +- a.values = NULL; + } + + retval = evaluate_relop(&a, &b, &type, operator); +@@ -1159,8 +1156,8 @@ list_record(const struct ovsdb_idl_row *row, + + atom.uuid = row->uuid; + ++ ovsdb_datum_init_empty(&datum); + datum.keys = &atom; +- datum.values = NULL; + datum.n = 1; + + cell->json = ovsdb_datum_to_json(&datum, &ovsdb_type_uuid); +@@ -1374,6 +1371,7 @@ set_column(const struct ovsdb_idl_table_class *table, error = ovsdb_atom_from_string(&value, NULL, &column->type.value, value_string, symtab); if (error) { @@ -4939,6 +4965,39 @@ index 3eb2c3cb98..5e4f34cf74 100644 return ODP_FIT_ERROR; } else { *expected_attrs |= UINT64_C(1) << OVS_KEY_ATTR_ND; +diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c +index d7e5f542a0..9bf00416c3 100644 +--- a/lib/ofp-actions.c ++++ b/lib/ofp-actions.c +@@ -3400,21 +3400,21 @@ ofpact_put_set_field(struct ofpbuf *ofpacts, const struct mf_field *field, + struct ofpact_set_field *sf = ofpact_put_SET_FIELD(ofpacts); + sf->field = field; + +- /* Fill in the value and mask if given, otherwise put zeroes so that the +- * caller may fill in the value and mask itself. */ ++ /* Fill with all zeroes to make sure the padding is initialized. */ ++ ofpbuf_put_zeros(ofpacts, total_size); ++ sf = ofpacts->header; ++ ++ /* Fill in the value and mask if given, otherwise keep the zeroes ++ * so that the caller may fill in the value and mask itself. */ + if (value) { +- ofpbuf_put_uninit(ofpacts, total_size); +- sf = ofpacts->header; + memcpy(sf->value, value, field->n_bytes); + if (mask) { + memcpy(ofpact_set_field_mask(sf), mask, field->n_bytes); + } else { + memset(ofpact_set_field_mask(sf), 0xff, field->n_bytes); + } +- } else { +- ofpbuf_put_zeros(ofpacts, total_size); +- sf = ofpacts->header; + } ++ + /* Update length. */ + ofpact_finish_SET_FIELD(ofpacts, &sf); + diff --git a/lib/ofp-ct.c b/lib/ofp-ct.c index 85a9d8beca..a140fba470 100644 --- a/lib/ofp-ct.c @@ -5088,7 +5147,7 @@ index 9ad42b232d..56512fc28d 100644 if (inner_error) { char *s = ovsdb_error_to_string_free(inner_error); diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c -index 634fbb56df..d92df28d19 100644 +index 634fbb56df..4c2a3e3aa9 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -177,6 +177,7 @@ static void ovsdb_idl_row_mark_backrefs_for_reparsing(struct ovsdb_idl_row *); @@ -5099,7 +5158,18 @@ index 634fbb56df..d92df28d19 100644 static void ovsdb_idl_txn_abort_all(struct ovsdb_idl *); static bool ovsdb_idl_txn_extract_mutations(struct ovsdb_idl_row *, -@@ -1374,6 +1375,7 @@ ovsdb_idl_track_clear__(struct ovsdb_idl *idl, bool flush_all) +@@ -727,7 +728,9 @@ ovsdb_idl_check_consistency(const struct ovsdb_idl *idl) + size_t n_columns = shash_count(&row->table->columns); + for (size_t j = 0; j < n_columns; j++) { + const struct ovsdb_type *type = &class->columns[j].type; +- const struct ovsdb_datum *datum = &row->new_datum[j]; ++ const struct ovsdb_datum *datum; ++ ++ datum = ovsdb_idl_read(row, &class->columns[j]); + add_row_references(&type->key, + datum->keys, datum->n, &row->uuid, + &dsts, &n_dsts, &allocated_dsts); +@@ -1374,6 +1377,7 @@ ovsdb_idl_track_clear__(struct ovsdb_idl *idl, bool flush_all) row->updated = NULL; } ovsdb_idl_row_untrack_change(row); @@ -5107,7 +5177,7 @@ index 634fbb56df..d92df28d19 100644 if (ovsdb_idl_row_is_orphan(row)) { ovsdb_idl_row_unparse(row); -@@ -1632,6 +1634,7 @@ ovsdb_idl_process_update(struct ovsdb_idl_table *table, +@@ -1632,6 +1636,7 @@ ovsdb_idl_process_update(struct ovsdb_idl_table *table, ru->columns); } else if (ovsdb_idl_row_is_orphan(row)) { ovsdb_idl_row_untrack_change(row); @@ -5115,7 +5185,7 @@ index 634fbb56df..d92df28d19 100644 ovsdb_idl_insert_row(row, ru->columns); } else { VLOG_ERR_RL(&semantic_rl, "cannot add existing row "UUID_FMT" to " -@@ -2283,11 +2286,15 @@ ovsdb_idl_row_untrack_change(struct ovsdb_idl_row *row) +@@ -2283,11 +2288,15 @@ ovsdb_idl_row_untrack_change(struct ovsdb_idl_row *row) return; } @@ -5133,7 +5203,7 @@ index 634fbb56df..d92df28d19 100644 } static struct ovsdb_idl_row * -@@ -3776,6 +3783,8 @@ ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) +@@ -3776,6 +3785,8 @@ ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) ovsdb_idl_remove_from_indexes(row_); if (!row->old_datum) { ovsdb_idl_row_unparse(row); @@ -5142,6 +5212,18 @@ index 634fbb56df..d92df28d19 100644 ovsdb_idl_row_clear_new(row); ovs_assert(!row->prereqs); hmap_remove(&row->table->rows, &row->hmap_node); +diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c +index 197cee1c67..69f1325972 100644 +--- a/lib/ovsdb-types.c ++++ b/lib/ovsdb-types.c +@@ -145,6 +145,7 @@ ovsdb_base_type_init(struct ovsdb_base_type *base, enum ovsdb_atomic_type type) + case OVSDB_TYPE_UUID: + base->uuid.refTableName = NULL; + base->uuid.refTable = NULL; ++ base->uuid.refType = OVSDB_REF_STRONG; + break; + + case OVSDB_N_TYPES: diff --git a/lib/ovsdb-types.h b/lib/ovsdb-types.h index 9777efea33..688fe56337 100644 --- a/lib/ovsdb-types.h @@ -5432,6 +5514,52 @@ index 3eb3a3816b..b3f541b6db 100644 } else { ok = parse_sockaddr_components(ss, host, port, default_port, target_, resolve_host, dns_failure); +diff --git a/lib/stream-replay.c b/lib/stream-replay.c +index 21da5220ef..eb552a529e 100644 +--- a/lib/stream-replay.c ++++ b/lib/stream-replay.c +@@ -114,8 +114,8 @@ stream_replay_open_wfd(struct stream *s, int open_result, const char *name) + ovs_replay_unlock(); + + if (ovs_replay_write(f, NULL, -open_result, true)) { +- VLOG_ERR_RL(&rl, "%s: failed to write 'open' failure: %d", +- s->name, open_result); ++ VLOG_ERR_RL(&rl, "%s: failed to write 'open' result: %d", ++ name, open_result); + } + if (open_result) { + /* We recorded failure to open the stream. */ +@@ -343,7 +343,7 @@ pstream_replay_open_wfd(struct pstream *ps, int listen_result, + + if (ovs_replay_write(f, NULL, -listen_result, true)) { + VLOG_ERR_RL(&rl, "%s: failed to write 'listen' result: %d", +- ps->name, listen_result); ++ name, listen_result); + } + + if (listen_result) { +diff --git a/lib/stream.c b/lib/stream.c +index 71039e24f1..6f5821689e 100644 +--- a/lib/stream.c ++++ b/lib/stream.c +@@ -216,7 +216,7 @@ int + stream_open(const char *name, struct stream **streamp, uint8_t dscp) + { + const struct stream_class *class; +- struct stream *stream; ++ struct stream *stream = NULL; + char *suffix_copy; + int error; + +@@ -547,7 +547,7 @@ int + pstream_open(const char *name, struct pstream **pstreamp, uint8_t dscp) + { + const struct pstream_class *class; +- struct pstream *pstream; ++ struct pstream *pstream = NULL; + char *suffix_copy; + int error; + diff --git a/lib/table.c b/lib/table.c index 48d18b6518..b7addbf390 100644 --- a/lib/table.c @@ -5932,7 +6060,7 @@ index f579a5ca46..f023b10cdf 100644 /* A node within a next_ct_states list. */ diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c -index 04b583f816..f78f3331c8 100644 +index 04b583f816..97ce3d4162 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -56,8 +56,10 @@ COVERAGE_DEFINE(dumped_duplicate_flow); @@ -5989,7 +6117,15 @@ index 04b583f816..f78f3331c8 100644 error = ENOSPC; } out: -@@ -1914,15 +1920,15 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, +@@ -1784,6 +1790,7 @@ ukey_create__(const struct nlattr *key, size_t key_len, + ukey->state_thread = ovsthread_id_self(); + ukey->state_where = OVS_SOURCE_LOCATOR; + ukey->created = ukey->flow_time = time_msec(); ++ ukey->missed_dumps = 0; + memset(&ukey->stats, 0, sizeof ukey->stats); + ukey->stats.used = used; + ukey->dp_layer = NULL; +@@ -1914,15 +1921,15 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, transition_ukey(old_ukey, UKEY_DELETED); transition_ukey(new_ukey, UKEY_VISIBLE); replaced = true; @@ -6010,7 +6146,7 @@ index 04b583f816..f78f3331c8 100644 return replaced; } -@@ -2941,6 +2947,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2941,6 +2948,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) /* Handler threads could be holding a ukey lock while it installs a * new flow, so don't hang around waiting for access to it. */ if (ovs_mutex_trylock(&ukey->mutex)) { @@ -6018,7 +6154,7 @@ index 04b583f816..f78f3331c8 100644 continue; } ukey_state = ukey->state; -@@ -2962,6 +2969,20 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2962,6 +2970,20 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) result = revalidate_ukey(udpif, ukey, &stats, &odp_actions, reval_seq, &recircs); } @@ -6039,7 +6175,7 @@ index 04b583f816..f78f3331c8 100644 if (result != UKEY_KEEP) { /* Clears 'recircs' if filled by revalidate_ukey(). */ reval_op_init(&ops[n_ops++], result, udpif, ukey, &recircs, -@@ -3195,11 +3216,19 @@ upcall_unixctl_purge(struct unixctl_conn *conn, int argc OVS_UNUSED, +@@ -3195,11 +3217,19 @@ upcall_unixctl_purge(struct unixctl_conn *conn, int argc OVS_UNUSED, struct udpif *udpif; LIST_FOR_EACH (udpif, list_node, &all_udpifs) { @@ -13155,6 +13291,18 @@ index a38bf9e6df..86a223caff 100644 printf("%s: %6d", prefix, reader_elapsed); for (i = 0; i < n_threads; i++) { printf(" %6" PRIu64, thread_working_ms[i]); +diff --git a/tests/test-multipath.c b/tests/test-multipath.c +index 08d2cbaebf..4e9a3ab5c2 100644 +--- a/tests/test-multipath.c ++++ b/tests/test-multipath.c +@@ -63,6 +63,7 @@ test_multipath_main(int argc, char *argv[]) + struct flow flow; + + flow_random_hash_fields(&flow); ++ flow_wildcards_init_catchall(&wc); + + mp.max_link = n - 1; + multipath_execute(&mp, &flow, &wc); diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index c761822e62..371dc7314b 100644 --- a/tests/test-ovsdb.c @@ -14347,6 +14495,19 @@ index de3ae16862..3c15e2b135 100755 return 0 elif key in ['-s', '--server']: server = True +diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c +index 62b5123029..05b6ba91fc 100644 +--- a/utilities/ovs-vsctl.c ++++ b/utilities/ovs-vsctl.c +@@ -278,7 +278,7 @@ parse_options(int argc, char *argv[], struct shash *local_options) + ctl_add_cmd_options(&options, &n_options, &allocated_options, OPT_LOCAL); + + for (;;) { +- int idx; ++ int idx = INT_MAX; + int c; + + c = getopt_long(argc, argv, short_options, options, &idx); diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index e9110c1d80..57f4d5f5ed 100644 --- a/vswitchd/bridge.c @@ -14432,6 +14593,19 @@ index cfcde34ffe..e400043ce7 100644 +diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c +index e5d99714de..b392981a04 100644 +--- a/vtep/vtep-ctl.c ++++ b/vtep/vtep-ctl.c +@@ -206,7 +206,7 @@ parse_options(int argc, char *argv[], struct shash *local_options) + ctl_add_cmd_options(&options, &n_options, &allocated_options, OPT_LOCAL); + + for (;;) { +- int idx; ++ int idx = INT_MAX; + int c; + + c = getopt_long(argc, argv, short_options, options, &idx); diff --git a/dpdk/.github/workflows/build.yml b/dpdk/.github/workflows/build.yml index 82d83f4030..c08f6ae827 100644 --- a/dpdk/.github/workflows/build.yml diff --git a/SPECS/openvswitch3.2.spec b/SPECS/openvswitch3.2.spec index d14fcd8..e7fa7bd 100644 --- a/SPECS/openvswitch3.2.spec +++ b/SPECS/openvswitch3.2.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.2.0 -Release: 110%{?dist} +Release: 111%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -763,6 +763,19 @@ exit 0 %endif %changelog +* Fri Nov 29 2024 Open vSwitch CI - 3.2.0-111 +- Merging upstream branch-3.2 [RH git: 4660a038ee] + Commit list: + 80a577585b ovsdb-idl: Fix use of uninitialized datum for graph consistency check. + 4ad5da024a db-ctl-base: Fix uninitialized datum fields while checking conditions. + c71ed61292 ovsdb-types: Fix use of uninitialized reference type. + 9a8b10f6a8 ofproto-dpif-upcall: Fix use of uninitialized missed dumps counter. + 9bf25c2626 ovs-vsctl, vtep-ctl: Silence memory sanitizer warning for longindex. + cac84c3cb0 tests: multipath: Fix use of uninitialized wildcards. + f2a7a5a987 stream: replay: Fix potential NULL dereference on write failure. + 18f6d09bd3 ofp-actions: Fix use of uninitialized padding in set-field. + + * Sat Nov 16 2024 Open vSwitch CI - 3.2.0-110 - Merging upstream branch-3.2 [RH git: 33ad14ea9d] Commit list: