From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796221205; b=WjXGdrkTm0Qor6t2zhx8vaBLZZmd4/Z1gtFCFEyyVtGp36/OrKpr+teSuplutdMiZc9X 1DVAp5m11K3p1Qf9l9QjJgVQ7+DzvTUP3R85GvU3XLl1ojPGIxRgWfjDrQ8uhFc/9IGiS 8jJxtM2ULPxqa2WcHsmT3AwpCNCHJZtaazkj0nGJybjJAxbLK4OpbvhEuvR1PE0MSMC3a 0sF+KlHmN75idpCR3U6byjnZ2PHxPwlSeM1EvAewucZB/WEYDvLI30T/BqEo3PBZBHMCT XeEq59gMEFAe5Tq0v4XGHzdjAKl+L6udqd3+ixYSwMCRG+GGloxGZ8Nd63oBT0ykCjw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796221205; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=wBJy+WK0mmSzJigk5dCzUcDnwyFu5hd4PS1OwbLNq7U=; b=pBiV/Q5Hn0YhF+JZqtGrswc6yTWDfX7usr+AObR/CkPSptgqxfA8TmeXeYsTc9K2ZiZ8 fDHGwg5RjuUqnKmuW7ACTj/GrEQ8tyMjfWvPf94kXpXjZ7EwfEKhAuAdbk4ooq178Mc2Z U8cueAzRndRT+OcAut45fyviAdeoIf70Lz4qjbvIYU9P5BVCkLUlF+b9wnKivgKSWHOy6 Dmy5efmk9IBgEh//DxPvGVc6pUEgrzvbuYFZToOM135vePD2KBGJc6jMPC1ZVTiPnoD5G +6d04/+WmSBqhMhVnVfkpsLFYNodcgoqdsI4/xDmvDuCU6d+urmOujnJdjO6ZBFExdg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0XWo1v7e; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B47A5606A32C for ; Wed, 2 Dec 2026 14:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0XWo1v7e Received: by smtp.kernel.org (Postfix) with ESMTPSA id A84511F000C1; Wed, 2 Dec 2026 14:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796221205; bh=wBJy+WK0mmSzJigk5dCzUcDnwyFu5hd4PS1OwbLNq7U=; h=Subject:To:Cc:From:Date; b=0XWo1v7eESzjqBkYLXHSd1dS3W6p3GrY+J3M/U07lXUDK8zVJy2S/xO/N1GFEiGkX ES6KN6pB34xmXBagOECQPuiXqIIijuYmvvLaaPAM3KrHNrZQXSRvQYZqsm2inl+xtl 8ms8dYEvqvAujcphpXyTBsojyzzaWgvcsoFkrC0M= Subject: FAILED: patch "[PATCH] ipvs: skip cport 0 connections in ip_vs_conn_out_get()" failed to apply to 6.1-stable tree To: axel.mierczuk@1password.com,ja@ssi.bg,pablo@netfilter.org Cc: From: Date: Wed, 02 Dec 2026 14:14:24 +0100 Message-ID: <2026120223-wimp-gazing-e0a5@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 5c8d6e2596e0935e2ace0b94e86ffb99e8434cd9 # git commit -s git send-email --to '' --in-reply-to '2026120223-wimp-gazing-e0a5@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 5c8d6e2596e0935e2ace0b94e86ffb99e8434cd9 Mon Sep 17 00:00:00 2001 From: Axel Mierczuk Date: Tue, 3 Nov 2026 11:57:46 -0500 Subject: [PATCH] ipvs: skip cport 0 connections in ip_vs_conn_out_get() ip_vs_conn_out_get() does not filter templates. A template with cport 0 is matched by a packet sent to client port 0 that traverses the out hook, and handle_response() then runs ip_vs_set_state() and the timeout update on a connection that must never see packets. A backup server receives such templates over the unauthenticated sync protocol. An ordinary connection scheduled for a client that uses source port 0 has cport 0 as well and is matched the same way. Apply the rule used by __ip_vs_conn_in_get(): a lookup for client port 0 matches only connections flagged IP_VS_CONN_F_NO_CPORT, which still wait for their cport, and a lookup for a nonzero client port matches only connections without this flag. Test p->vport, which was already compared with cp->cport, instead of reading cp->cport again. ip_vs_ftp_out() relies on the first case: it looks up the data connection with client port 0 to find the IP_VS_CONN_F_NO_CPORT entry created for an earlier PASV or EPSV reply. That lookup keeps working. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Suggested-by: Julian Anastasov Signed-off-by: Axel Mierczuk Signed-off-by: Pablo Neira Ayuso diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 66fcdc00ef37..83d8a9153a34 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -590,6 +590,8 @@ struct ip_vs_conn *ip_vs_conn_out_get(const struct ip_vs_conn_param *p) ip_vs_addr_equal(p->af, p->vaddr, &cp->caddr) && ip_vs_addr_equal(p->af, p->caddr, saddr) && + (!p->vport ^ + (!(cp->flags & IP_VS_CONN_F_NO_CPORT))) && p->protocol == cp->protocol) { if (__ip_vs_conn_get(cp)) goto out;