From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795963744; b=bC7LOKBegZBLtmlmXXLlvVdyansR1m2VRhj7HSuNCxI+khUPddxoyV6NfZVTb3ZSeWx3 FnPqUyl6b9p7b/EtDfbJe+e77JhWBY7QRqi4uflYzBVCyPihuUZE+J1v1LboZUymeNQB6 QI6sV4zYekPSt0vBHJXDjVL+I0yMh3bVXyPCOB9fiJiWijj4thZrAfujC5lQFJLDI12ZZ 6KiWcO8PgrbxYWJhYwa7GzU1y61ekyrctBuUAzqrUnePfimFLWqVzdGZfz3zWIcCKcCa+ zOq++tffPCV3V6pXqTrchkujwP4RDm3s1xIMTwM6Y1WC3T9Ym89oGW8NrKyN5Mn87iw== 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=LsalEbpC3kGWhHm2+xlKL6tR+FuGIx+Luu66QVARBSoeCBE/QvgFpPODbrQ23JCzGWl7 c5Zb4XyghmQpFGeHca3czRv4WztEpOSW4Ngu4iJnH1iA6JXvsNyok/QThzLyEAeQYR1iZ MLwW5O/D3BuYTn3jfI2zeKykMzeBOME1bRJ+mJSXouoJ9RSjq6FYSuw3vzJ+shwA+2lH7 K+feKfMRaOcaRm4ckdYxVC3aHl3YAdQPV8oOc0oocUxSr2Ps8z9dxDzLFeXyU57Q4HVme 0lszeKRG5E2FUggV7+HNOn8rL0dwNwEqMjqj1eOKmadwMP3S2RWy7Unc7G2v0E0qlFA== 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.174 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 E7F48606A31C for ; Sun, 29 Nov 2026 14:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7F48606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com 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 Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-5365d725440so85598011cf.0 for ; Sun, 29 Nov 2026 06:49:03 -0800 (PST) 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=u+VdayRrM3WRLmXfjYfbvyOhBlUIxQsDPU3yDiD/DFQGcBjV0q7BlfMekhdGI8Yp7u Vo+O0Ge3As99j31Q3stmgRSG+Qe5hr61ESyP5Pf+BXtW/AWy0kYZ99RJt0DWdUdid1Hd TwCAMsHqYZij00uGQsTGuZfig6aF1JwdX/5dbIU/oORQWdLyMXsCpn3WbMSwPVrWrKnf MqPNnr5vns7DfhvgixXVjuNEy7z7Jzd65XIemeHViqB91EbcD/sqyPkUlEdi3Qg0chNI 4tNpwcYNja9iIfagNk1e2yKvEpPLiATvnD7y8+2njbeCBKZ2P+tzUi+N9wJIRv7U+u8J tY2w== X-Forwarded-Encrypted: i=1; AL+hErFeMkC/WqhOCxAmxMTaXivzSfXAuIifRaSBydApW3hyy21jv/498R3sZ2bJI/HLymNRYrTK8GqRlvvVyAI=@vger.kernel.org X-Gm-Message-State: APuU4Z8b/Ae4LGnPCGbR+IYUQS/nU4F2CvbGEMRwY34z5QGBtFA5qzMm 1EFUHS3xVC6SRYazeJD1l3LCkBN38Wc1Y203vIWnSF0TXU7M//HPR1k2LrFwXK9TgtU= X-Gm-Gg: AZFdTZd128KhlXV3+Beg8pimqMaRkDK7vhjmLYT3hg2HACNBspxScjV2Pf6NQvGdLfJ /0gi/agehBSlEqpvHLsvlgHomYrEsw5Vrlhd4Xoy7HZ77Lc/mdjtxuvfXNQDDY+pUF9HBUFRcw4 o0Az2w0PyW50lwDsOGdAAy1pWNS2r2hb4nfYSE5lWGx41te6Xft+RjiDLppXRly400H+owlxOuf UWipSqQk+QjajLY6/noSCX24Jw41B8CU84wgj/w93ejOi1IvvGgMsKfb9EsH9mBuk5gKii554N9 sMzFDDXP7R4fadfwAtvhyif9lFpnpQSR8wjc960R0rZd/qAtnx2TQqANQfmxRP+NjgcN+mOflDM I6fOU7xhEQ2uo4B5/7omLLTstfpMJlvJQnyuM0nr3e47BR/MX8XKhiAtgEM41Qk5QDc0RTvYIcU r5bfSwm150gCOvWpX5Yq6H3IG9vseBhzxawoxrg1KP8oPsm9xyff8Gy6km1KVkB4R2eRGm5JB+5 /CWYhWNKS+pSiELj5MpX3GGZCvTWPot8AWGeqQOsmMxkfUT49qysQAEsMYi1/nFR7KYNkup75eL vXVSrxOqesZ7vh1u1x3xnly5Xuk2UzUjaEveRMM7fBDefmmQs3VUo+Lo7yCjpvMkqy9jyJpmlcD K5vDnaECRsH43hpU1L26ObjI= 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) 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) From: Andrew Stellman To: Jon Maloy , Tung Quang Nguyen Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH net] tipc: don't set SYN on multicast from connection-oriented sockets Date: Sun, 29 Nov 2026 09:49:01 -0500 Message-ID: <20261129144901.90934-1-bugs@stellman-greene.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andrew Stellman __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 --- 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