diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index dde1a2c..ecc4a2a 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -1784,6 +1784,36 @@ index 0a888be455..6339701627 100644 }; bool filter_zone; uint16_t zone; +diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c +index 3a8068b12c..eeb0e3851c 100644 +--- a/lib/db-ctl-base.c ++++ b/lib/db-ctl-base.c +@@ -831,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); +@@ -1160,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); diff --git a/lib/dp-packet.c b/lib/dp-packet.c index 305822293b..df7bf8e6b3 100644 --- a/lib/dp-packet.c @@ -3258,6 +3288,39 @@ index 9306c9b4d4..5e4f34cf74 100644 segs += segments_left; while (ovs_scan_len(s, &n, IPV6_SCAN_FMT, seg_s) +diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c +index da7b1dd31a..67f0140b20 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-prop.c b/lib/ofp-prop.c index 0a685750c1..0e54543bdd 100644 --- a/lib/ofp-prop.c @@ -3391,10 +3454,21 @@ 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 ba720474b6..d92df28d19 100644 +index ba720474b6..4c2a3e3aa9 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c -@@ -3783,6 +3783,8 @@ ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) +@@ -728,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); +@@ -3783,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); @@ -3403,6 +3477,18 @@ index ba720474b6..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/packets.c b/lib/packets.c index 5803d26f4a..edac30b77b 100644 --- a/lib/packets.c @@ -3646,6 +3732,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 @@ -4054,7 +4186,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 b5cbeed878..f122b47f1c 100644 +index b5cbeed878..ff1d4b0028 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -57,8 +57,10 @@ COVERAGE_DEFINE(dumped_inconsistent_flow); @@ -4085,7 +4217,15 @@ index b5cbeed878..f122b47f1c 100644 error = ENOSPC; } out: -@@ -1927,15 +1928,15 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, +@@ -1797,6 +1798,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; +@@ -1927,15 +1929,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; @@ -4106,7 +4246,7 @@ index b5cbeed878..f122b47f1c 100644 return replaced; } -@@ -2973,6 +2974,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2973,6 +2975,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)) { @@ -4114,7 +4254,7 @@ index b5cbeed878..f122b47f1c 100644 continue; } ukey_state = ukey->state; -@@ -2995,6 +2997,20 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2995,6 +2998,20 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) result = revalidate_ukey(udpif, ukey, &stats, &odp_actions, reval_seq, &recircs); } @@ -8472,6 +8612,18 @@ index 98e494abf4..9ee4399331 100644 OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP +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 c4ab899d45..710341b655 100644 --- a/tests/test-ovsdb.c @@ -9852,6 +10004,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 495be35652..edef0f18ef 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 95a65fcdcd..0352030fec 100644 --- a/vswitchd/bridge.c @@ -9901,6 +10066,19 @@ index 612ba41e3b..882add5b5e 100644

+diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c +index 26b8540b4a..880c95f0e3 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 272a6ffc7f..6b35c56da0 100644 --- a/dpdk/.github/workflows/build.yml diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index fc055f8..49776cd 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 17%{?dist} +Release: 18%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -769,6 +769,19 @@ exit 0 %endif %changelog +* Fri Nov 29 2024 Open vSwitch CI - 3.3.0-18 +- Merging upstream branch-3.3 [RH git: 39fe512e30] + Commit list: + bb01225094 ovsdb-idl: Fix use of uninitialized datum for graph consistency check. + 0a8cce4cf8 db-ctl-base: Fix uninitialized datum fields while checking conditions. + ddf40869b7 ovsdb-types: Fix use of uninitialized reference type. + c078d89c22 ofproto-dpif-upcall: Fix use of uninitialized missed dumps counter. + e8a835dfdb ovs-vsctl, vtep-ctl: Silence memory sanitizer warning for longindex. + 9e35252f7d tests: multipath: Fix use of uninitialized wildcards. + ef73816480 stream: replay: Fix potential NULL dereference on write failure. + 98cace4471 ofp-actions: Fix use of uninitialized padding in set-field. + + * Fri Nov 29 2024 Open vSwitch CI - 3.3.0-17 - Merging upstream branch-3.3 [RH git: 87a57cfed4] Commit list: