From: Greg Kroah-Hartman Date: Fri, 15 May 2026 15:21:14 +0000 (+0200) Subject: 5.10-stable patches X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d9d8a90652969af44761d39ba1643e2c01b2a7e;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: vsock-virtio-fix-accept-queue-count-leak-on-transport-mismatch.patch --- diff --git a/queue-5.10/series b/queue-5.10/series index bc9ce4b6e0..aa34eb25d0 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -291,3 +291,4 @@ batman-adv-bla-only-purge-non-released-claims.patch batman-adv-bla-put-backbone-reference-on-failed-claim-hash-insert.patch bluetooth-l2cap-fix-null-ptr-deref-in-l2cap_sock_get_sndtimeo_cb.patch vsock-fix-buffer-size-clamping-order.patch +vsock-virtio-fix-accept-queue-count-leak-on-transport-mismatch.patch diff --git a/queue-5.10/vsock-virtio-fix-accept-queue-count-leak-on-transport-mismatch.patch b/queue-5.10/vsock-virtio-fix-accept-queue-count-leak-on-transport-mismatch.patch new file mode 100644 index 0000000000..76e394adac --- /dev/null +++ b/queue-5.10/vsock-virtio-fix-accept-queue-count-leak-on-transport-mismatch.patch @@ -0,0 +1,54 @@ +From 52bcb57a4e8a0865a76c587c2451906342ae1b2d Mon Sep 17 00:00:00 2001 +From: Dudu Lu +Date: Mon, 13 Apr 2026 21:14:09 +0800 +Subject: vsock/virtio: fix accept queue count leak on transport mismatch + +From: Dudu Lu + +commit 52bcb57a4e8a0865a76c587c2451906342ae1b2d upstream. + +virtio_transport_recv_listen() calls sk_acceptq_added() before +vsock_assign_transport(). If vsock_assign_transport() fails or +selects a different transport, the error path returns without +calling sk_acceptq_removed(), permanently incrementing +sk_ack_backlog. + +After approximately backlog+1 such failures, sk_acceptq_is_full() +returns true, causing the listener to reject all new connections. + +Fix by moving sk_acceptq_added() to after the transport validation, +matching the pattern used by vmci_transport and hyperv_transport. + +Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") +Signed-off-by: Dudu Lu +Reviewed-by: Bobby Eshleman +Reviewed-by: Luigi Leonardi +Reviewed-by: Stefano Garzarella +Acked-by: Michael S. Tsirkin +Link: https://patch.msgid.link/20260413131409.19022-1-phx0fer@gmail.com +Signed-off-by: Paolo Abeni +Signed-off-by: Luigi Leonardi +Signed-off-by: Greg Kroah-Hartman +--- + net/vmw_vsock/virtio_transport_common.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/net/vmw_vsock/virtio_transport_common.c ++++ b/net/vmw_vsock/virtio_transport_common.c +@@ -1089,8 +1089,6 @@ virtio_transport_recv_listen(struct sock + return -ENOMEM; + } + +- sk_acceptq_added(sk); +- + lock_sock_nested(child, SINGLE_DEPTH_NESTING); + + child->sk_state = TCP_ESTABLISHED; +@@ -1112,6 +1110,7 @@ virtio_transport_recv_listen(struct sock + return ret; + } + ++ sk_acceptq_added(sk); + if (virtio_transport_space_update(child, pkt)) + child->sk_write_space(child); +