<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openvswitch.git, branch branch-3.0</title>
<subtitle>github.com: openvswitch/ovs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/'/>
<entry>
<title>dpctl: Fix dereferencing null pointer in parse_ct_limit_zones().</title>
<updated>2023-05-11T19:40:14+00:00</updated>
<author>
<name>Zhiqi Chen</name>
<email>chenzhiqi.123@bytedance.com</email>
</author>
<published>2023-05-10T08:35:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=b60fb752e395fddd8bbffe8c90cd285ece0bc846'/>
<id>b60fb752e395fddd8bbffe8c90cd285ece0bc846</id>
<content type='text'>
Command with empty string following "dpctl/ct-get-limits zone="
such as "ovs-appctl dpctl/ct-get-limits zone=" will cause
parse_ct_limit_zones() dereferencing null.

Signed-off-by: Zhiqi Chen &lt;chenzhiqi.123@bytedance.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Command with empty string following "dpctl/ct-get-limits zone="
such as "ovs-appctl dpctl/ct-get-limits zone=" will cause
parse_ct_limit_zones() dereferencing null.

Signed-off-by: Zhiqi Chen &lt;chenzhiqi.123@bytedance.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdev-offload: Fix deadlock/recursive use of the netdev_hmap_rwlock rwlock.</title>
<updated>2023-05-10T20:08:54+00:00</updated>
<author>
<name>Eelco Chaudron</name>
<email>echaudro@redhat.com</email>
</author>
<published>2023-05-09T14:29:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=4ddfdaff1c20ef7199837455741e00261de7fd61'/>
<id>4ddfdaff1c20ef7199837455741e00261de7fd61</id>
<content type='text'>
When doing performance testing with OVS v3.1 we ran into a deadlock
situation with the netdev_hmap_rwlock read/write lock. After some
debugging, it was discovered that the netdev_hmap_rwlock read lock
was taken recursively. And well in the following sequence of events:

 netdev_ports_flow_get()
   It takes the read lock, while it walks all the ports
   in the port_to_netdev hmap and calls:
   - netdev_flow_get() which will call:
     - netdev_tc_flow_get() which will call:
       - netdev_ifindex_to_odp_port()
          This function also takes the same read lock to
          walk the ifindex_to_port hmap.

In OVS a read/write lock does not support recursive readers. For details
see the comments in ovs-thread.h. If you do this, it will lock up,
mainly due to OVS setting the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
attribute to the lock.

The solution with this patch is to use two separate read/write
locks, with an order guarantee to avoid another potential deadlock.

Fixes: 9fe21a4fc12a ("netdev-offload: replace netdev_hmap_mutex to netdev_hmap_rwlock")
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2182541
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When doing performance testing with OVS v3.1 we ran into a deadlock
situation with the netdev_hmap_rwlock read/write lock. After some
debugging, it was discovered that the netdev_hmap_rwlock read lock
was taken recursively. And well in the following sequence of events:

 netdev_ports_flow_get()
   It takes the read lock, while it walks all the ports
   in the port_to_netdev hmap and calls:
   - netdev_flow_get() which will call:
     - netdev_tc_flow_get() which will call:
       - netdev_ifindex_to_odp_port()
          This function also takes the same read lock to
          walk the ifindex_to_port hmap.

In OVS a read/write lock does not support recursive readers. For details
see the comments in ovs-thread.h. If you do this, it will lock up,
mainly due to OVS setting the PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
attribute to the lock.

The solution with this patch is to use two separate read/write
locks, with an order guarantee to avoid another potential deadlock.

Fixes: 9fe21a4fc12a ("netdev-offload: replace netdev_hmap_mutex to netdev_hmap_rwlock")
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2182541
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ofproto-dpif-xlate: Fix use-after-free when xlate_actions().</title>
<updated>2023-05-10T20:08:43+00:00</updated>
<author>
<name>Yunjian Wang</name>
<email>wangyunjian@huawei.com</email>
</author>
<published>2023-05-06T10:00:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=a1dbda71625fcc80f10260c7ecc67324d322edda'/>
<id>a1dbda71625fcc80f10260c7ecc67324d322edda</id>
<content type='text'>
Currently, bundle-&gt;cvlans and xbundle-&gt;cvlans are pointing to the
same memory location. This can cause issues if the main thread
modifies bundle-&gt;cvlans and frees it while the revalidator thread
is still accessing xbundle-&gt;cvlans. This leads to use-after-free
error.

AddressSanitizer: heap-use-after-free on address 0x615000007b08 at
                        pc 0x0000004ede1e bp 0x7f3120ee0310 sp 0x7f3120ee0300
READ of size 8 at 0x615000007b08 thread T25 (revalidator25)
    0 0x4ede1d in bitmap_is_set lib/bitmap.h:91
    1 0x4fcb26 in xbundle_allows_cvlan ofproto/ofproto-dpif-xlate.c:2028
    2 0x4fe279 in input_vid_is_valid ofproto/ofproto-dpif-xlate.c:2294
    3 0x502abf in xlate_normal ofproto/ofproto-dpif-xlate.c:3051
    4 0x5164dc in xlate_output_action ofproto/ofproto-dpif-xlate.c:5361
    5 0x522576 in do_xlate_actions ofproto/ofproto-dpif-xlate.c:7047
    6 0x52a751 in xlate_actions ofproto/ofproto-dpif-xlate.c:8061
    7 0x4e2b66 in xlate_key ofproto/ofproto-dpif-upcall.c:2212
    8 0x4e2e13 in xlate_ukey ofproto/ofproto-dpif-upcall.c:2227
    9 0x4e345d in revalidate_ukey__ ofproto/ofproto-dpif-upcall.c:2276
    10 0x4e3f85 in revalidate_ukey ofproto/ofproto-dpif-upcall.c:2395
    11 0x4e7ac5 in revalidate ofproto/ofproto-dpif-upcall.c:2858
    12 0x4d9ed3 in udpif_revalidator ofproto/ofproto-dpif-upcall.c:1010
    13 0x7cd92e in ovsthread_wrapper lib/ovs-thread.c:423
    14 0x7f312ff01f3a  (/usr/lib64/libpthread.so.0+0x8f3a)
    15 0x7f312fc8f51f in clone (/usr/lib64/libc.so.6+0xf851f)

0x615000007b08 is located 8 bytes inside of 512-byte region
                                        [0x615000007b00,0x615000007d00)
freed by thread T0 here:
    0 0x7f3130378ad8 in free (/usr/lib64/libasan.so.4+0xe0ad8)
    1 0x49044e in bundle_set ofproto/ofproto-dpif.c:3431
    2 0x444f92 in ofproto_bundle_register ofproto/ofproto.c:1455
    3 0x40e6c9 in port_configure vswitchd/bridge.c:1300
    4 0x40bcfd in bridge_reconfigure vswitchd/bridge.c:921
    5 0x41f1a9 in bridge_run vswitchd/bridge.c:3313
    6 0x42d4fb in main vswitchd/ovs-vswitchd.c:132
    7 0x7f312fbbcc86 in __libc_start_main (/usr/lib64/libc.so.6+0x25c86)

previously allocated by thread T0 here:
    0 0x7f3130378e70 in __interceptor_malloc
    1 0x8757fe in xmalloc__ lib/util.c:140
    2 0x8758da in xmalloc lib/util.c:175
    3 0x875927 in xmemdup lib/util.c:188
    4 0x475f63 in bitmap_clone lib/bitmap.h:79
    5 0x47797c in vlan_bitmap_clone lib/vlan-bitmap.h:40
    6 0x49048d in bundle_set ofproto/ofproto-dpif.c:3433
    7 0x444f92 in ofproto_bundle_register ofproto/ofproto.c:1455
    8 0x40e6c9 in port_configure vswitchd/bridge.c:1300
    9 0x40bcfd in bridge_reconfigure vswitchd/bridge.c:921
    10 0x41f1a9 in bridge_run vswitchd/bridge.c:3313
    11 0x42d4fb in main vswitchd/ovs-vswitchd.c:132
    12 0x7f312fbbcc86 in __libc_start_main (/usr/lib64/libc.so.6+0x25c86)

Fixes: fed8962aff57 ("Add new port VLAN mode "dot1q-tunnel"")
Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, bundle-&gt;cvlans and xbundle-&gt;cvlans are pointing to the
same memory location. This can cause issues if the main thread
modifies bundle-&gt;cvlans and frees it while the revalidator thread
is still accessing xbundle-&gt;cvlans. This leads to use-after-free
error.

AddressSanitizer: heap-use-after-free on address 0x615000007b08 at
                        pc 0x0000004ede1e bp 0x7f3120ee0310 sp 0x7f3120ee0300
READ of size 8 at 0x615000007b08 thread T25 (revalidator25)
    0 0x4ede1d in bitmap_is_set lib/bitmap.h:91
    1 0x4fcb26 in xbundle_allows_cvlan ofproto/ofproto-dpif-xlate.c:2028
    2 0x4fe279 in input_vid_is_valid ofproto/ofproto-dpif-xlate.c:2294
    3 0x502abf in xlate_normal ofproto/ofproto-dpif-xlate.c:3051
    4 0x5164dc in xlate_output_action ofproto/ofproto-dpif-xlate.c:5361
    5 0x522576 in do_xlate_actions ofproto/ofproto-dpif-xlate.c:7047
    6 0x52a751 in xlate_actions ofproto/ofproto-dpif-xlate.c:8061
    7 0x4e2b66 in xlate_key ofproto/ofproto-dpif-upcall.c:2212
    8 0x4e2e13 in xlate_ukey ofproto/ofproto-dpif-upcall.c:2227
    9 0x4e345d in revalidate_ukey__ ofproto/ofproto-dpif-upcall.c:2276
    10 0x4e3f85 in revalidate_ukey ofproto/ofproto-dpif-upcall.c:2395
    11 0x4e7ac5 in revalidate ofproto/ofproto-dpif-upcall.c:2858
    12 0x4d9ed3 in udpif_revalidator ofproto/ofproto-dpif-upcall.c:1010
    13 0x7cd92e in ovsthread_wrapper lib/ovs-thread.c:423
    14 0x7f312ff01f3a  (/usr/lib64/libpthread.so.0+0x8f3a)
    15 0x7f312fc8f51f in clone (/usr/lib64/libc.so.6+0xf851f)

0x615000007b08 is located 8 bytes inside of 512-byte region
                                        [0x615000007b00,0x615000007d00)
freed by thread T0 here:
    0 0x7f3130378ad8 in free (/usr/lib64/libasan.so.4+0xe0ad8)
    1 0x49044e in bundle_set ofproto/ofproto-dpif.c:3431
    2 0x444f92 in ofproto_bundle_register ofproto/ofproto.c:1455
    3 0x40e6c9 in port_configure vswitchd/bridge.c:1300
    4 0x40bcfd in bridge_reconfigure vswitchd/bridge.c:921
    5 0x41f1a9 in bridge_run vswitchd/bridge.c:3313
    6 0x42d4fb in main vswitchd/ovs-vswitchd.c:132
    7 0x7f312fbbcc86 in __libc_start_main (/usr/lib64/libc.so.6+0x25c86)

previously allocated by thread T0 here:
    0 0x7f3130378e70 in __interceptor_malloc
    1 0x8757fe in xmalloc__ lib/util.c:140
    2 0x8758da in xmalloc lib/util.c:175
    3 0x875927 in xmemdup lib/util.c:188
    4 0x475f63 in bitmap_clone lib/bitmap.h:79
    5 0x47797c in vlan_bitmap_clone lib/vlan-bitmap.h:40
    6 0x49048d in bundle_set ofproto/ofproto-dpif.c:3433
    7 0x444f92 in ofproto_bundle_register ofproto/ofproto.c:1455
    8 0x40e6c9 in port_configure vswitchd/bridge.c:1300
    9 0x40bcfd in bridge_reconfigure vswitchd/bridge.c:921
    10 0x41f1a9 in bridge_run vswitchd/bridge.c:3313
    11 0x42d4fb in main vswitchd/ovs-vswitchd.c:132
    12 0x7f312fbbcc86 in __libc_start_main (/usr/lib64/libc.so.6+0x25c86)

Fixes: fed8962aff57 ("Add new port VLAN mode "dot1q-tunnel"")
Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-idl.at: Fix write-changed-only tests without change tracking.</title>
<updated>2023-05-04T16:23:59+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2023-04-28T14:17:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=e32d183be7397f98aa8eacb25a0f73aceff936a3'/>
<id>e32d183be7397f98aa8eacb25a0f73aceff936a3</id>
<content type='text'>
The '-w' command line argument is not passed to test-ovsdb in the
OVSDB_CHECK_IDL_WRITE_CHANGED_ONLY_C, so it juts repeats normal
tests without testing the feature.

Adding the flag.  And using the long version of the flag to make
things more obvious and harder to overlook.  Swapping the argument
in the other working test as well, just for consistency.

Fixes: d94cd0d3eec3 ("ovsdb-idl: Support write-only-changed IDL monitor mode.")
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The '-w' command line argument is not passed to test-ovsdb in the
OVSDB_CHECK_IDL_WRITE_CHANGED_ONLY_C, so it juts repeats normal
tests without testing the feature.

Adding the flag.  And using the long version of the flag to make
things more obvious and harder to overlook.  Swapping the argument
in the other working test as well, just for consistency.

Fixes: d94cd0d3eec3 ("ovsdb-idl: Support write-only-changed IDL monitor mode.")
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tc: Fix cleaning chains.</title>
<updated>2023-04-28T17:32:40+00:00</updated>
<author>
<name>Roi Dayan</name>
<email>roid@nvidia.com</email>
</author>
<published>2023-04-27T11:32:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=8f2c9d2f1455596d4183c30222166547d897ea19'/>
<id>8f2c9d2f1455596d4183c30222166547d897ea19</id>
<content type='text'>
Sometimes there is a need to clean empty chains as done in
delete_chains_from_netdev().  The cited commit doesn't remove
the chain completely which cause adding ingress_block later to fail.
This can be reproduced with adding bond as ovs port which makes ovs
use ingress_block for it.
While at it add the netdev name that fails to the log.

Fixes: e1e5eac5b016 ("tc: Add TCA_KIND flower to delete and get operation to avoid rtnl_lock().")
Signed-off-by: Roi Dayan &lt;roid@nvidia.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes there is a need to clean empty chains as done in
delete_chains_from_netdev().  The cited commit doesn't remove
the chain completely which cause adding ingress_block later to fail.
This can be reproduced with adding bond as ovs port which makes ovs
use ingress_block for it.
While at it add the netdev name that fails to the log.

Fixes: e1e5eac5b016 ("tc: Add TCA_KIND flower to delete and get operation to avoid rtnl_lock().")
Signed-off-by: Roi Dayan &lt;roid@nvidia.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python-stream: Handle SSL error in do_handshake.</title>
<updated>2023-04-26T12:56:35+00:00</updated>
<author>
<name>Stefan Hoffmann</name>
<email>stefan.hoffmann@cloudandheat.com</email>
</author>
<published>2023-04-21T08:29:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=0136ccd060e9a9f79d22623ab41f715a5f761505'/>
<id>0136ccd060e9a9f79d22623ab41f715a5f761505</id>
<content type='text'>
In some cases ovsdb server or relay gets restarted, ovsdb python clients
may keep the local socket open. Instead of reconnecting a lot of failures
will be logged.
This can be reproduced with ssl connections to the server/relay and
restarting it, so it has the same IP after restart.

This patch catches the Exceptions at do_handshake to recreate the
connection on the client side.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Stefan Hoffmann &lt;stefan.hoffmann@cloudandheat.com&gt;
Signed-off-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Signed-off-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Co-authored-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Co-authored-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases ovsdb server or relay gets restarted, ovsdb python clients
may keep the local socket open. Instead of reconnecting a lot of failures
will be logged.
This can be reproduced with ssl connections to the server/relay and
restarting it, so it has the same IP after restart.

This patch catches the Exceptions at do_handshake to recreate the
connection on the client side.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Stefan Hoffmann &lt;stefan.hoffmann@cloudandheat.com&gt;
Signed-off-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Signed-off-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Co-authored-by: Luca Czesla &lt;luca.czesla@mail.schwarz&gt;
Co-authored-by: Max Lamprecht &lt;max.lamprecht@mail.schwarz&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dpif-netlink: Fix memory leak dpif_netlink_open().</title>
<updated>2023-04-25T19:59:37+00:00</updated>
<author>
<name>Yunjian Wang</name>
<email>wangyunjian@huawei.com</email>
</author>
<published>2023-04-24T11:54:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=385f79c87e944575759f1d3e611c9dbb92b3c57b'/>
<id>385f79c87e944575759f1d3e611c9dbb92b3c57b</id>
<content type='text'>
In the specific call to dpif_netlink_dp_transact() (line 398) in
dpif_netlink_open(), the 'dp' content is not being used in the branch
when no error is returned (starting line 430). Furthermore, the 'dp'
and 'buf' variables are overwritten later in this same branch when a
new netlink request is sent (line 437), which results in a memory leak.

Reported by Address Sanitizer.

Indirect leak of 1024 byte(s) in 1 object(s) allocated from:
  0  0x7fe09d3bfe70 in __interceptor_malloc (/usr/lib64/libasan.so.4+0xe0e70)
  1  0x8759be in xmalloc__ lib/util.c:140
  2  0x875a9a in xmalloc lib/util.c:175
  3  0x7ba0d2 in ofpbuf_init lib/ofpbuf.c:141
  4  0x7ba1d6 in ofpbuf_new lib/ofpbuf.c:169
  5  0x9057f9 in nl_sock_transact lib/netlink-socket.c:1113
  6  0x907a7e in nl_transact lib/netlink-socket.c:1817
  7  0x8b5abe in dpif_netlink_dp_transact lib/dpif-netlink.c:5007
  8  0x89a6b5 in dpif_netlink_open lib/dpif-netlink.c:398
  9  0x5de16f in do_open lib/dpif.c:348
  10 0x5de69a in dpif_open lib/dpif.c:393
  11 0x5de71f in dpif_create_and_open lib/dpif.c:419
  12 0x47b918 in open_dpif_backer ofproto/ofproto-dpif.c:764
  13 0x483e4a in construct ofproto/ofproto-dpif.c:1658
  14 0x441644 in ofproto_create ofproto/ofproto.c:556
  15 0x40ba5a in bridge_reconfigure vswitchd/bridge.c:885
  16 0x41f1a9 in bridge_run vswitchd/bridge.c:3313
  17 0x42d4fb in main vswitchd/ovs-vswitchd.c:132
  18 0x7fe09cc03c86 in __libc_start_main (/usr/lib64/libc.so.6+0x25c86)

Fixes: b841e3cd4a28 ("dpif-netlink: Fix feature negotiation for older kernels.")
Reviewed-by: David Marchand &lt;david.marchand@redhat.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the specific call to dpif_netlink_dp_transact() (line 398) in
dpif_netlink_open(), the 'dp' content is not being used in the branch
when no error is returned (starting line 430). Furthermore, the 'dp'
and 'buf' variables are overwritten later in this same branch when a
new netlink request is sent (line 437), which results in a memory leak.

Reported by Address Sanitizer.

Indirect leak of 1024 byte(s) in 1 object(s) allocated from:
  0  0x7fe09d3bfe70 in __interceptor_malloc (/usr/lib64/libasan.so.4+0xe0e70)
  1  0x8759be in xmalloc__ lib/util.c:140
  2  0x875a9a in xmalloc lib/util.c:175
  3  0x7ba0d2 in ofpbuf_init lib/ofpbuf.c:141
  4  0x7ba1d6 in ofpbuf_new lib/ofpbuf.c:169
  5  0x9057f9 in nl_sock_transact lib/netlink-socket.c:1113
  6  0x907a7e in nl_transact lib/netlink-socket.c:1817
  7  0x8b5abe in dpif_netlink_dp_transact lib/dpif-netlink.c:5007
  8  0x89a6b5 in dpif_netlink_open lib/dpif-netlink.c:398
  9  0x5de16f in do_open lib/dpif.c:348
  10 0x5de69a in dpif_open lib/dpif.c:393
  11 0x5de71f in dpif_create_and_open lib/dpif.c:419
  12 0x47b918 in open_dpif_backer ofproto/ofproto-dpif.c:764
  13 0x483e4a in construct ofproto/ofproto-dpif.c:1658
  14 0x441644 in ofproto_create ofproto/ofproto.c:556
  15 0x40ba5a in bridge_reconfigure vswitchd/bridge.c:885
  16 0x41f1a9 in bridge_run vswitchd/bridge.c:3313
  17 0x42d4fb in main vswitchd/ovs-vswitchd.c:132
  18 0x7fe09cc03c86 in __libc_start_main (/usr/lib64/libc.so.6+0x25c86)

Fixes: b841e3cd4a28 ("dpif-netlink: Fix feature negotiation for older kernels.")
Reviewed-by: David Marchand &lt;david.marchand@redhat.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ofp-parse: Check ranges on string to uint32_t conversion.</title>
<updated>2023-04-25T19:56:04+00:00</updated>
<author>
<name>Yunjian Wang</name>
<email>wangyunjian@huawei.com</email>
</author>
<published>2023-04-21T08:27:10+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=d3ea4d7ce9e44be14dc904a7bcc6a68bddd80d85'/>
<id>d3ea4d7ce9e44be14dc904a7bcc6a68bddd80d85</id>
<content type='text'>
An unnecessarily overflow would occurs when the 'value' is longer than
4294967295. So it's required to check ranges to avoid uint32_t overflow.

Reported-by: Nan Zhou &lt;zhounan14@huawei.com&gt;
Acked-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An unnecessarily overflow would occurs when the 'value' is longer than
4294967295. So it's required to check ranges to avoid uint32_t overflow.

Reported-by: Nan Zhou &lt;zhounan14@huawei.com&gt;
Acked-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>learning-switch: Fix coredump of OpenFlow15 learning-switch.</title>
<updated>2023-04-25T18:49:42+00:00</updated>
<author>
<name>Faicker Mo</name>
<email>faicker.mo@ucloud.cn</email>
</author>
<published>2023-04-07T06:30:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=cac372ec4db2b9e420ef1a8b2560360e6da6dff4'/>
<id>cac372ec4db2b9e420ef1a8b2560360e6da6dff4</id>
<content type='text'>
The OpenFlow15 Packet-Out message contains the match instead of the
in_port.  The flow.tunnel.metadata.tab is not inited but used in the
loop of tun_metadata_to_nx_match.

The coredump gdb backtrace is:
 0  memcpy_from_metadata (dst=0x2f060, src=0x30880, loc=0x10) at lib/tun-metadata.c:467
 1  metadata_loc_from_match_read (match=0x30598, is_masked=&lt;..&gt;,
                                  mask=0x30838, idx=0, map=0x0)
        at lib/tun-metadata.c:865
 2  metadata_loc_from_match_read (is_masked=&lt;...&gt;, mask=0x30838, idx=0,
                                  match=0x30598, map=0x0)
        at lib/tun-metadata.c:854
 3  tun_metadata_to_nx_match (b=0x892260, oxm=OFP15_VERSION, match=0x30598)
        at lib/tun-metadata.c:888
 4  nx_put_raw (b=0x892260, oxm=OFP15_VERSION, match=0x30598,
                cookie=&lt;...&gt;, cookie=0, cookie_mask=&lt;...&gt;, cookie_mask=0)
        at lib/nx-match.c:1186
 5  oxm_put_match (b=0x892260, match=0x30598, version=OFP15_VERSION)
        at lib/nx-match.c:1343
 6  ofputil_encode_packet_out (po=0x30580, protocol=&lt;...&gt;) at lib/ofp-packet.c:1226
 7  process_packet_in (sw=0x891d70, oh=&lt;...&gt;) at lib/learning-switch.c:619
 8  lswitch_process_packet (msg=0x892210, sw=0x891d70) at lib/learning-switch.c:374
 9  lswitch_run (sw=0x891d70) at lib/learning-switch.c:324
 10 main (argc=&lt;...&gt;, argv=&lt;...&gt;) at utilities/ovs-testcontroller.c:180

Fix that by initing the flow metadata.

Fixes: 35eb6326d5d0 ("ofp-util: Add flow metadata to ofputil_packet_out")
Signed-off-by: Faicker Mo &lt;faicker.mo@ucloud.cn&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The OpenFlow15 Packet-Out message contains the match instead of the
in_port.  The flow.tunnel.metadata.tab is not inited but used in the
loop of tun_metadata_to_nx_match.

The coredump gdb backtrace is:
 0  memcpy_from_metadata (dst=0x2f060, src=0x30880, loc=0x10) at lib/tun-metadata.c:467
 1  metadata_loc_from_match_read (match=0x30598, is_masked=&lt;..&gt;,
                                  mask=0x30838, idx=0, map=0x0)
        at lib/tun-metadata.c:865
 2  metadata_loc_from_match_read (is_masked=&lt;...&gt;, mask=0x30838, idx=0,
                                  match=0x30598, map=0x0)
        at lib/tun-metadata.c:854
 3  tun_metadata_to_nx_match (b=0x892260, oxm=OFP15_VERSION, match=0x30598)
        at lib/tun-metadata.c:888
 4  nx_put_raw (b=0x892260, oxm=OFP15_VERSION, match=0x30598,
                cookie=&lt;...&gt;, cookie=0, cookie_mask=&lt;...&gt;, cookie_mask=0)
        at lib/nx-match.c:1186
 5  oxm_put_match (b=0x892260, match=0x30598, version=OFP15_VERSION)
        at lib/nx-match.c:1343
 6  ofputil_encode_packet_out (po=0x30580, protocol=&lt;...&gt;) at lib/ofp-packet.c:1226
 7  process_packet_in (sw=0x891d70, oh=&lt;...&gt;) at lib/learning-switch.c:619
 8  lswitch_process_packet (msg=0x892210, sw=0x891d70) at lib/learning-switch.c:374
 9  lswitch_run (sw=0x891d70) at lib/learning-switch.c:324
 10 main (argc=&lt;...&gt;, argv=&lt;...&gt;) at utilities/ovs-testcontroller.c:180

Fix that by initing the flow metadata.

Fixes: 35eb6326d5d0 ("ofp-util: Add flow metadata to ofputil_packet_out")
Signed-off-by: Faicker Mo &lt;faicker.mo@ucloud.cn&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb: Allow conversion records with no data in a clustered storage.</title>
<updated>2023-04-24T20:48:53+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2023-03-27T19:42:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=6e55e0f50c6a8d944446da72504b9e397ef04bbc'/>
<id>6e55e0f50c6a8d944446da72504b9e397ef04bbc</id>
<content type='text'>
If the schema with no data was read from the clustered storage, it
should mean a database conversion request.  In general, we can get:

1. Just data --&gt; Transaction record.
2. Schema + Data --&gt; Database conversion or raft snapshot install.
3. Just schema --&gt; New.  Database conversion request.

We cannot distinguish between conversion and snapshot installation
request in the current implementation, so we will keep handling
conversion with data in the same way as before, i.e. if data is
provided, we should use it.

ovsdb-tool is updated to handle this record type as well while
converting cluster to standalone.

This change doesn't introduce a way for such records to appear in
the database.  That will be added in the future commits targeting
conversion speed increase.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the schema with no data was read from the clustered storage, it
should mean a database conversion request.  In general, we can get:

1. Just data --&gt; Transaction record.
2. Schema + Data --&gt; Database conversion or raft snapshot install.
3. Just schema --&gt; New.  Database conversion request.

We cannot distinguish between conversion and snapshot installation
request in the current implementation, so we will keep handling
conversion with data in the same way as before, i.e. if data is
provided, we should use it.

ovsdb-tool is updated to handle this record type as well while
converting cluster to standalone.

This change doesn't introduce a way for such records to appear in
the database.  That will be added in the future commits targeting
conversion speed increase.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
