Repository navigation
[Deepin-Kernel-SIG] [linux 6.6.y] [Upstream] Update kernel base to 6.6.162 #2272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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]); | ||
|
|
||
|
|
@@ -837,6 +839,7 @@ static void connect(struct backend_info *be) | |
| err: | ||
| if (be->vif->num_queues > 0) | ||
| xenvif_disconnect_data(be->vif); /* Clean up existing queues */ | ||
| synchronize_net(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High · Statistics can access freed queues When queue setup fails after at least one queue has been initialized while a statistics read begins after the grace period, Set Prompt for AI agentsIn `drivers/net/xen-netback/xenbus.c` at line 842:
**Statistics can access freed queues**
When queue setup fails after at least one queue has been initialized while a statistics read begins after the grace period, `xenvif_get_stats()` can start an RCU read after `synchronize_net()` returns, observe the still-positive `vif->num_queues`, and read `vif->queues` after the error path frees it with `vfree()`. The resulting use-after-free can crash the backend.
Set `num_queues` to zero before `synchronize_net()` in the error path, while preserving the count needed to deinitialize the queues. |
||
| for (queue_index = 0; queue_index < be->vif->num_queues; ++queue_index) | ||
| xenvif_deinit_queue(&be->vif->queues[queue_index]); | ||
| vfree(be->vif->queues); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium · Failed reconnect retains multicast entries
When a guest adds multicast addresses while a queue is active and a later queue or ring fails to connect,
xenvif_disconnect_data()now stops the queues without clearingfe_mcast_addr, and the connection-error path only synchronizes and deinitializes those queues. Guest-supplied multicast entries therefore survive a failed connection and are reused on a later connection, leaving stale multicast membership and potentially allowing multicast traffic to reach the guest after it unsubscribes.Clear the multicast list on the failed-connect path after the synchronization point, or otherwise ensure it is reset before reconnecting.
Prompt for AI agents