From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.172 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== 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== 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 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 ; Sun, 29 Nov 2026 14:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ED901606A323 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-f172.google.com with SMTP id d75a77b69052e-5366ae57896so98802351cf.3 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=SvFHjH55jG4q7gJ0chhzJCD3f28ORpo6+PK9cQ3BTAu+Brd4JXj/JTvd5405vOYYqe b1YxMRy+eanNpSJzba+KGTsbEKBGwe9xmhQ+qxgfi9LAM01S1QNiUAm/bZSuOEOIO+kz CYzvtkq046G8/7gC4bE09qdVAYSZfQlcE1uNeR56mWxqK0fvQSRcaaCqP5KSUrBjZS0T MCv5sVBKG0wblC4h0D1lU/mbjBBfOx0HlKvyLRmg7VGic+Tkts7Q8/7cEoh+Bhn9sXyF 6UaXSv4KiYagyrb5Mw2vTQGyDYiHSRpLNsCuOF6JO4I/U+q3kfZWOkLXtwbfVSTJZ8CJ 8cOg== X-Forwarded-Encrypted: i=1; AL+hErEoY4akvb/GAj6+SFyRSwxo2YziEXTSEkugxWEToyYY4i8f0CwNmpvrBZw6kkygnSZyJX38RJo=@vger.kernel.org X-Gm-Message-State: APuU4Z9KkOYUK39LD0bDg+EcbqduXXt6Ws/SSgxNAVjZ6niPR3lljvch KDPT6CsQWRmCZXp/3HpuVkMRg/n8ZJubtUJx1RTYIKfeNyO2aeGZ9A93cIfnUEw2eas= X-Gm-Gg: AZFdTZeLRSbU3LGVheq7nBrmNxnTnGtppYxXssOeyM34XglK3LilDasm3MTIsB6OKBs 4Vk4c2pB+xNgdLhnXeK1lQ8oPa/eP/2n1IIbvXytYPNtWG88/ITKlc2ksy+i9LLuHhTCBe/Rc7X zlHW4xtNQwsUNJSGor+XUyFLA4k2U/94zuxEAcp+5Yirb2LoJW3O9XfiZwvHL+dhwu3XKiHoOWZ Gfj7NAU2K9BhOT8ZOtdg7B4c2bup5dJ2UrzepTerkhSpVKjFifo+reXnrbfaHn48lvA3y+5APPr PMfslN593D6gXymdurVERuoDgyDTA/aquBIjm8gXdR/dj8eSiGzO/A4JaRut7j13RnJ6CpORV3J 1hNtcq/BnHm4Ly+hQ1Lh8CMJIVvHyIdY7e4DaMZOGr/uWm98RG7ogoSNCAvKf75bnaBoNZBUj0K QlS+vJrqAHfCPx77p7fzme6oy6B8muGAVXHYKfZUH1T5RZJtvOojZkt24DZVJa5bffG7OorVumb HFK8dtTZjibNWy68XD7OmHQvbkKBmJ2FJcygs50I6dflirRo7SycGsxS9NBF6h1HB0WEedARAE9 oEFtgmM/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) 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: netdev@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