🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24160

[PATCH net] tipc: don't set SYN on multicast from connection-oriented sockets

#24160
From: Andrew Stellman
Date: Sun, 29 Nov 2026 14:49
68 lines
14104 bytes
From: Andrew Stellman <astellman@stellman-greene.com>

__tipc_sendmsg() sets the SYN bit on every message sent from an
unconnected SEQPACKET or STREAM socket, including messages sent to a
service range, which go out as multicast. A range send doesn't connect
the socket, so every range send from it carries SYN.

Since commit c55c8edafa91 ("tipc: smooth change between replicast and
broadcast"), multicast receivers treat SYN as the marker for a switch
between replicast and broadcast: tipc_mcast_filter_msg() puts a SYN
message in the receiving socket's deferred queue until its twin
arrives by the other method. tipc_mcast_xmit() sends a twin only when
the sending socket switches method. The first range send from a new
socket can get one, because it switches from the default method. A
later range send that doesn't switch method has no twin, so a remote
receiver defers it instead of delivering it.

Don't set SYN when the destination is a service range. Connection
setup to a service or socket address still sets it. This changes
existing behaviour: range sends from these sockets no longer carry
SYN, so remote receivers deliver the ones they used to defer.

Tested on net-next (f89726ffabef) in arm64 QEMU with KASAN, with two
TIPC nodes in network namespaces linked by veth, an unprivileged
sender and RDM receivers with a 3-second receive timeout. Each socket
made two range sends. Without this patch, in each of five runs, the
remote receiver got the first range send from the SEQPACKET socket
and the first from the STREAM socket, but not the second from either.
With it, in each of two runs, it got all four. RDM multicast and a
SEQPACKET unicast were received in every run, and KASAN reported
nothing.

Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
---
The issue was found by Claude Opus 5.5 running Quality Playbook, an
LLM-driven code review tool:
https://github.com/andrewstellman/quality-playbook
The fix was drafted with OpenAI GPT-6 (Codex) and this changelog with
Claude Opus 5.5, and both were reviewed by me.

SYN has been set on these sends since commit 25b9221b9594 ("tipc: add
SYN bit to connection setup messages"), but multicast receivers act
on it only since c55c8edafa91, so that's the Fixes target.
net/tipc/socket.c is identical in net (28a371228d4e), net-next
(f89726ffabef) and mainline (bb13fcd7f438).

A reproducer is available on request.

 net/tipc/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 26771a98dc7a6..27af43bce0b11 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1460,7 +1460,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen)
 			return -EOPNOTSUPP;
 		if (atype == TIPC_SERVICE_ADDR)
 			tsk->conn_addrtype = atype;
-		msg_set_syn(hdr, 1);
+		msg_set_syn(hdr, atype != TIPC_SERVICE_RANGE);
 	}
 
 	memset(&skaddr, 0, sizeof(skaddr));
-- 
2.53.0
Technical Details
Message-ID: <20261129144901.90934-1-bugs@stellman-greene.com>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373524-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373524-linux-kernel-netdev=dewy.ru
From: bugs@stellman-greene.com (Andrew Stellman)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net] tipc: don't set SYN on multicast from connection-oriented sockets
Date: Sun, 29 Nov 2026 09:49:01 -0500
Organization: Usenet Network
Message-ID: <20261129144901.90934-1-bugs@stellman-greene.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1187928"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:SaGY///HMGAFanonauDeWo3YzpE= sha256:AfCAVbe8lWjMwkQPH9bj69HpsYEpq6Llzi+Fxc32xoA=
	sha1:iizdQttFBIZvuYb+Zp7XXq3r4xs= sha256:+xr7jTwz7oIAY/kD/xlsq07SdF3zsucEJUfBWI8Ya0o=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 73D4E125F99; Sun, 29 Nov 2026 17:49:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=stellman-greene-com.20260707.gappssmtp.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id SorzWk_InapS;
	Sun, 29 Nov 2026 17:49:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373524-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id B2CDD125F94; Sun, 29 Nov 2026 17:49:11 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id CC289242E8; Sun, 29 Nov 2026 14:49:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795963745;
	b=o3VUflb1EIGtJJqUhSmjvBNj04BdIoIZDIP7yQPCyTTE9d2IcodIYeasKVeLebRrqgeh
	 N5TNNyWkh2oTtBA/fjQewL4KREtFG+r85fXu+/U+VKZniZp3qLmAhVsnowoTvQbeTKHJL
	 UmwgxhTVSSqEOShWxZ0Ix94gmQ9kTulrmmEv1gpNWsZ7LRRlpv9EtH8C49F01uNAe7D/L
	 94Sr4DmP1GXPfCbced19VcNOnO/yAxmtphhLrSbwblupRmosyxsWbf+9isyLc7YJVeUex
	 TJGOzMqJbKpH+qCqsbJY/zoE49EpNIx7rzxa0EA3tX11gbnhwWFfm8WnbIjQnRf/Y1g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795963745;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=VaHU02faMY5gIVOm56Q0HJMGNJ25W+G2WMw9YBi0voY=;
	b=24J2qbUwWFTL38KgI2U4JyR2zNxeQ+AbDa/CvG3140BBtUTvfZd3eIHDyfGQ40OfCckb
	 MV1H1113l4+hpwv8pGAlcFUXRbf6ER6bvQV7ifu9MHnx/pgUnOWGVVHSOMKzqXLdKtGYD
	 8A0R6NUwS1CupT+ePLVvCcK3COqHzZ1g2yunQO4oGuymxiEEbkORiF65z61U8VGTJ/IWA
	 RHANV8+i7btHiHn8RnoJfySaKBHY8qav8s5pbsf1K+yidoVsquyA5M4PzOaQvlY61jp9Y
	 n1GGNZHQP2G0vHQW+TAo8niIUQGVrtnQddDTMNgZZjFR4VrNbhbprDiRILQ4tGwjLZw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=L9Dalqz7;
	dmarc=none header.from=stellman-greene.com;
	spf=none smtp.mailfrom=stellman-greene.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id AE149606A336;
	Sun, 29 Nov 2026 14:49:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=L9Dalqz7
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.172
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795963744;
	b=cZ4XcJVPu8YeF3su2DOBZLZEzYOGTTf64UriCayF49uf62MkVzlgHXB3xYhcDcMm2VGD
	 e9K0ySGQOJ94ps4DNyhyhkNTNTmggD/6byxY4HpNOlGWHnAeacW0QOzirrzaaDqVGFq8V
	 CHqEKX+i8JbTKcNe6Favu3K6D1coNPXjvS3kNc3FWTp5QuhNF7+h5l2IEd+pqtpUy57MH
	 Nu0BelEWskLXjMr7OjIo6YA3mJGeJ9YMDzUlcDp1paMkyIKjLv7Om+KnPwp0fFPT9hiwl
	 tXwjv8Gk84gahi5mpYw67HIjrXnxyeXJwMO6FA4Sf63bq/N7iiqShrZRkAmc4OcjjbQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795963744;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
	 Content-Transfer-Encoding;
	bh=VaHU02faMY5gIVOm56Q0HJMGNJ25W+G2WMw9YBi0voY=;
	b=2uVxPRkwMbnL9dpJBFo5PtYnlvFpU8Cpj85IOLVTAj4m51iuIpE3EXwoTzrccxtXUERd
	 +IiKK9csPpINlb61d7ar9VaGKvPe7wJmKfX06ZxV2nDvRZO/RrmNq5ueH4BOz3YYYtPPc
	 JhrTUX2uvVRPgPioVqLLH27dn6SDXE/FwwESGgnC0GGVJGjtJ1lQKVL3rLhB+kkZLTJkZ
	 5htCWi/9sbMPWQW7mOBbzWfaMyMIksPpdvEKYaGEZEc8RVRAV8Ttc2GdCQZbgGAGrJ26I
	 qshkc63b4Ms1aRm3wSAJEiQpQvgoJhalWPsj6K7RzyxhdXmXIlub8rUgFBOajRjprQg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=stellman-greene.com;
	spf=none smtp.mailfrom=stellman-greene.com;
	dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=L9Dalqz7;
	arc=none smtp.remote-ip=209.85.160.172
X-Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED901606A323
	for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 14:49:03 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ED901606A323
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com
X-Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-5366ae57896so98802351cf.3
        for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 06:49:03 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1795963743; x=1796568543; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=VaHU02faMY5gIVOm56Q0HJMGNJ25W+G2WMw9YBi0voY=;
        b=L9Dalqz7p9eMXMalOLNmjuboed/mfJHqSfMiyKjLiluw9spcCk16CLHjXrl9EwAZxT
         zoukBWpXMcJZmIM7SB4uJ6pVI+xEYhFTCckXW1IJ8hERlbIQC+5cwPV/XHX7L6KoQK8y
         gCJg34j3scdMDNgwxrZpKxQ9KpplGoNdjqROXrf4/F+ZO5m7zFMvcEmZLGB0bOBFvCiF
         spUTN8Ga6O6sZdqVolOaJS6r35o1A2km/2VnxzJt8hPvOXtUwes4D4Oljm00kqhrbdpN
         R6xridLEFtzCXIYbuilscgHH6RZGw/LZoySD+zsyAYFBGDawWbIIMGWkRTRXzVaZuEU1
         Neew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795963743; x=1796568543;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=VaHU02faMY5gIVOm56Q0HJMGNJ25W+G2WMw9YBi0voY=;
        b=SvFHjH55jG4q7gJ0chhzJCD3f28ORpo6+PK9cQ3BTAu+Brd4JXj/JTvd5405vOYYqe
         b1YxMRy+eanNpSJzba+KGTsbEKBGwe9xmhQ+qxgfi9LAM01S1QNiUAm/bZSuOEOIO+kz
         CYzvtkq046G8/7gC4b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c+WT5EgiCv0iUs1SEk3MuBdfrQN7K8RceN8amhWSPLJDdZKiOfxnb589RRWWUEggjwF
	80frtJjXEBF4+bzyi925NE1w=
X-Received: by 2002:a05:620a:45a3:b0:93f:568d:ebbc with SMTP id af79cd13be357-949ba98e6dfmr5445510185a.32.1795963742836;
        Sun, 29 Nov 2026 06:49:02 -0800 (PST)
X-Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:3c29:a645:a023:b4a7])
        by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb0354a9sm2325451285a.5.2026.11.29.06.49.02
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Sun, 29 Nov 2026 06:49:02 -0800 (PST)
X-Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org,
	tipc-discussion@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.53.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list