From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92A953C553B for ; Wed, 10 Jun 2026 12:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781095209; cv=none; b=S9NmxsQPiNeirQhSxBdILcUYut6SsjOrAIOe2gB7G8CkQKpu7spHYFVf3mvj7R/7LHEbon52S7CQUfz1uGpytYQyVVlRuGnEYhtalfpS5cUn0AyJ0paMZ8UbrQJCMUv7JsvZ4j13WLMqvFm6yUNOuQ+LcoFJ+oMQTdoYcre5cPQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781095209; c=relaxed/simple; bh=+skWT8NryATf+XyKQMJXMXUusm5T6cV0uPARsNdQuAI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gpIeA62HQUl9X3fOt0pS7U2f9cUnIlNz8xaNbVyEfI2G7kTxOPyHvqY1/jy6GvW1xq6F1lROONBvGfKRchLslnn7xRsG8k+0P5Ur069JjCgpTvQw8b2Gmr9r3DlJ56bCOBh98Z7LCC8oeGwya3cY4HDhUtg8n41etUSVRtQvdeY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DcBS9hHy; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DcBS9hHy" Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-9157d3f2098so798061885a.3 for ; Wed, 10 Jun 2026 05:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781095207; x=1781700007; 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; bh=xfq8PCJ4BjOQoktbE1QkQOK7RW+LQsYtRE6liOdqkoA=; b=DcBS9hHydr7Qy5KUD/yjLhJ1AzwcTp7EdlnhkNWimSrNX85Bx9OWrlbAAJOa/fqy6Y 2VU8UmQAtlrnXQUJ2yXD4wEMdjIeQiVEkack8Ij8LHRZ64EflvrFolnrAbfDG8+l+wN0 xNPBWv8ibBO5BV7O+ggUdkE161UQ+7Bl1Mwy+XF/IOiU8zOwZqvzBINy8z+4QiC66LT2 rDMu1UimPU6FqEODcDNY5bVhGMa/Q+sdPzrqym9J3xiwY2Qa1nD/0ryRQM7JEwlfh+Kc VrndosZa1TIwjSLxpuXtHHGTFruTLnDCkPVFIsfQlBOlTGGPffwzLIVYZCc9kSyqfSEb QV/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781095207; x=1781700007; 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; bh=xfq8PCJ4BjOQoktbE1QkQOK7RW+LQsYtRE6liOdqkoA=; b=g3KCn9N3j0QcSS2vlEN2hzr8mrFpHXbdYA9wQ6hLJGBc8F/7OmtlQ4Wss7U+SfFMmw WLDr2KU1+nWr9Jv4AavqmCZIsHluIzggvb6gxayoIYPLusV3878mnSojbu4kM5hrAS6C 4QaOOauYw9wcq1i/AWkDSuQ0SOgxuNUnWNThXNxCntnqyiCbY+zDdQ+3aKo69FFTa7hO Ry5Kad6x6JgUCYU93PHSbc7vtvU6ao58qEnpTh3GKXJ8q8C+D6EYi4RWQI7DQWpHqYBv 2Xkermwpdx6ArNbTog2iV8iKvlRKx0Ui/+uz04dosOfjCO1oMI88wDW0UFP3k1dS4rpD e14w== X-Forwarded-Encrypted: i=1; AFNElJ9eOp00u9xwaFEYFFUA5xUHZpYsP3PtIJmlZM0cimRlaBFxWjnSkUjq81MCMtHGhLrlNV0ktL7VrxYEMFc=@vger.kernel.org X-Gm-Message-State: AOJu0YzrqWTzEyNVSaFxhLY/FsscfI3YK49ojf0LsTTUDSGokyr8ZptQ JSZ+h8gENXjUm/LF3hiqltu5SQaSiE83HlWNo+49nCZTTfGjzaV6cLZN X-Gm-Gg: Acq92OH7f/+G60mPdZ0TPcSrgs1u7v07ycn0bLZQw6JP2bixLCdvBRjel9hqkkzJdwE bQGN5seteRUln806MWlLXg1+jN52a4cBzaLlDfLPuhI0rOMgC35/68ZGcEpFXE9J0pSVxpG9yPM 6L9craJWcmdp4XvR6yGnlSgCSlQGDV21anaCiLGOv12YkOW6e00/KTZNMk5jdddfGE+XJt959Si +xbWGIzHWdNYj2Be8JkRAQtoGyzaUbSQrmH33/kJkr2jSkbJbp12leAmWj9t2aF8/wx7W3xs0KC C++WCQoyKU42kvwaxZgy3fg9u+Q+7k43WO8MQrR1vp9abbK9h+Pwa6oAnO1Q9MZ38RmmZMeJQ/d soWJcjutvRSrFkUY2Y4JnqB4ezpDtkb5n5MXUhZNr0pn0oZu478VKdSzl9e+P3So02CW40FxKaW SxjbOP6Iv3DnKILOucX5q7SNFjqzfk4p6n6JHUOyTXG4/mG8eQAnQV3/RBEizvtRoZ64cnGODCZ HrngWjkl5xaYdBUl3wxe34gLKc7EWQ= X-Received: by 2002:a05:620a:6cc7:b0:914:c82c:79fe with SMTP id af79cd13be357-915a9ccca05mr3979896485a.27.1781095207439; Wed, 10 Jun 2026 05:40:07 -0700 (PDT) Received: from server0 (c-68-48-65-54.hsd1.mi.comcast.net. [68.48.65.54]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9158a237330sm2499096885a.16.2026.06.10.05.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 05:40:06 -0700 (PDT) From: Michael Bommarito To: Jon Maloy , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Tung Quang Nguyen , Simon Horman , Ying Xue , netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH net v4 0/3] tipc: fix netlink gate and receive-path bugs Date: Wed, 10 Jun 2026 08:40:00 -0400 Message-ID: <20260610124003.3831170-1-michael.bommarito@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit This is v4 of the public TIPC series. The only change from v3 is in patch 1: TIPC_NL_MEDIA_SET now uses GENL_UNS_ADMIN_PERM like the other mutators, instead of GENL_ADMIN_PERM, so the whole series uses the namespace-aware CAP_NET_ADMIN check that matches the legacy TIPC netlink path. Patches 2 and 3 are unchanged. Patch 1 gives the TIPCv2 mutating generic-netlink operations the admin gate the legacy API already has, so a local unprivileged process can no longer change TIPC state. Patch 2 drops CONN_ACK messages that acknowledge more outstanding sends than exist, preventing the snt_unacked underflow. Patch 3 rejects peer bindings with lower > upper, which would otherwise leak binding-table memory. Changes in v4: - Patch 1: use GENL_UNS_ADMIN_PERM for TIPC_NL_MEDIA_SET as well, rather than GENL_ADMIN_PERM. This keeps the same namespace-aware CAP_NET_ADMIN check that netlink_net_capable() performs on the legacy path, so CAP_NET_ADMIN holders in a non-initial user namespace (containers) keep working (Tung Quang Nguyen). Changes in v3: - Drop the discovery-message length patch; tipc_msg_validate() already rejects the short messages it guarded against (Tung Quang Nguyen). - Patch 2 (snt_unacked): drop the conn_ack local and test tsk->snt_unacked against msg_conn_ack() inline (Tung Quang Nguyen). - Patch 3 (inverted ranges): restructure the declaration block, moving ua below key at the maintainer's request (Tung Quang Nguyen). Changes in v2: - Patch 1 uses GENL_ADMIN_PERM for TIPC_NL_MEDIA_SET and GENL_UNS_ADMIN_PERM for the netns-scoped mutators. - Patch 2 validates msg_conn_ack() at the start of the CONN_ACK block and drops invalid messages instead of capping the value. - Patch 3 reorders the new u32 declarations in reverse-Xmas-tree order. Michael Bommarito (3): tipc: require net admin for TIPCv2 netlink mutators tipc: prevent snt_unacked underflow on CONN_ACK tipc: reject inverted service ranges from peer bindings net/tipc/name_distr.c | 13 +++++++++++-- net/tipc/netlink.c | 12 ++++++++++++ net/tipc/socket.c | 3 +++ 3 files changed, 26 insertions(+), 2 deletions(-) -- 2.53.0