From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B18E3DB324; Mon, 17 Aug 2026 15:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786980075; cv=none; b=BE/x2UK0mnoiYkhhileDgFTiVYT97GCOx3siZzBySgTICjTZCnnrVdNcBiIJeqogk1I+3zb3lBU1rI8mxG+DzjmEi3m0dKfdx/8plQ+aWfgJEMXQjHWSJh06cKLRpATNnsws7NxGIee1uF0kFhgUDbBcVSkl8rwUL5X5jxnwb/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786980075; c=relaxed/simple; bh=LyYluf7UZ6gO9fkyO2e6dkkqhCwGBA3DJEuxW7+kJ9s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JK0Fj306ejETOOeUsFoA4qbbmUPoNJILEIDvqcJ/IsWWqs2+gs47ujQPjb0SGEju7l8PtD5+L9bEF6K5ZW0DwGUE4P5qNDp9ChccKbf9Y6f099TmY6XBbR+/TEO1UJB1ftsbPzEUJp9eJAD4HvvY2dOtffKcijZvLYgcSRlPDOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2Fy+V0Qz; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2Fy+V0Qz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 758F21F00A3D; Mon, 17 Aug 2026 15:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786980074; bh=T/Z0xHpLRoktZZp4B4zDJpJklbtvc6tEhCZ2nImUivQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2Fy+V0QzNtLOPXDLOVhLCt8BmPmoAs5Vl/X2mG0Z+xh2u4qLIHr8tIw85SPGeU4CA O7gpsTy5ZlOGOKhWv8GnaaW/iQkIwvM350UiKKOIr3bqui9p2VZQCShdgzQdH63LH4 rZ4nwhQmxxRjjZTGBd98WzxG4ktmv+ZSZkrxr/W4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuan Tan , Yifan Wu , Juefei Pu , Xin Liu , Julian Anastasov , Zhiling Zou , Ren Wei , Pablo Neira Ayuso Subject: [PATCH 6.1 408/609] ipvs: do not propagate one-packet flag to synced conns Date: Mon, 17 Aug 2026 15:31:44 +0200 Message-ID: <20260817132557.824658926@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132543.039278408@linuxfoundation.org> References: <20260817132543.039278408@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhiling Zou commit a63d2dbaeb50a85d4c976b15a36e6b0c7113db5b upstream. Synced connections can be created before their destination exists. When the destination is later added, ip_vs_bind_dest() copies connection flags from the destination into cp->flags. IP_VS_CONN_F_ONE_PACKET connections are not synced. If a synced connection inherits IP_VS_CONN_F_ONE_PACKET while it is already hashed, expiry can treat it as a one-packet connection and skip unlinking the existing conn_tab node, leaving stale hash nodes pointing at a freed struct ip_vs_conn. Drop IP_VS_CONN_F_ONE_PACKET from destination flags when binding synced connections. Fixes: 26ec037f9841 ("IPVS: one-packet scheduling") Cc: stable@vger.kernel.org Reported-by: Yuan Tan Reported-by: Yifan Wu Reported-by: Juefei Pu Reported-by: Xin Liu Suggested-by: Julian Anastasov Signed-off-by: Zhiling Zou Signed-off-by: Ren Wei Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/ipvs/ip_vs_conn.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -599,6 +599,9 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, s flags = cp->flags; /* Bind with the destination and its corresponding transmitter */ if (flags & IP_VS_CONN_F_SYNC) { + /* Synced conns are hashed, so they can not get this flag */ + conn_flags &= ~IP_VS_CONN_F_ONE_PACKET; + /* if the connection is not template and is created * by sync, preserve the activity flag. */