]> git.hungrycats.org Git - linux/commitdiff
xen-netback: defer xenvif_mcast_addr_list_free()
authorJan Beulich <jbeulich@suse.com>
Fri, 6 Nov 2026 16:07:01 +0000 (17:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 18:17:37 +0000 (13:17 -0500)
commit bfddc420afe827d9f06458cdf8087cd602f8c9cb upstream.

In order for the function to legitimately avoid locking/RCU, it needs to
run after all TX/RX processing has finished/stopped: Lookups happen from
xenvif_start_xmit(), while adds/removes happen from xenvif_tx_action()
(called out of xenvif_poll()).

Move the call out of xenvif_disconnect_data() (the call to the function
from connect()'s error path doesn't require any cleaning up there), and
put it past the synchronization point in backend_disconnect().

This is XSA-527 / CVE-2026-100081.

Fixes: b17075d5c198 ("xen-netback: fix race condition on XenBus disconnect")
Reported-by: kerhunt <kerhunt@proton.me>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/xenbus.c

index a0a438881388088e4961b80fd27029a1e0e6a03f..b233834ec6cc75b91f36f83b1e76e1e657dab60d 100644 (file)
@@ -812,8 +812,6 @@ void xenvif_disconnect_data(struct xenvif *vif)
 
                xenvif_disconnect_queue(queue);
        }
-
-       xenvif_mcast_addr_list_free(vif);
 }
 
 void xenvif_disconnect_ctrl(struct xenvif *vif)
index 5e4d522de36bd5b8b068ae76af83052693dde94f..aca25db2503b61e80188600058a0365f208ad98a 100644 (file)
@@ -267,6 +267,8 @@ static void backend_disconnect(struct backend_info *be)
                vif->num_queues = 0;
                synchronize_net();
 
+               xenvif_mcast_addr_list_free(vif);
+
                for (queue_index = 0; queue_index < num_queues; ++queue_index)
                        xenvif_deinit_queue(&vif->queues[queue_index]);