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 DD0652BF3E2 for ; Thu, 28 May 2026 08:11:22 +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=1779955884; cv=none; b=CWRoIEqxgvHGVjjmJDYrVXiieUkJCJAOyC10b2TpMxsqaz9Xgsw3+qmdvG4kbQ+k7T96aiB4vInSszFvhOPLzYDKQ53E/Nj8OL1rJwauBRRXE4W0hzcUFKQiJYwX6jk9zBuvU5uNb7sNSL3X0/jj7vJiK+/Yj+XGmvH8qasZLGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779955884; c=relaxed/simple; bh=pNhhJoUfw7UguyYH4kklOYWlfkhgbmLnTaFlcy6aWiU=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=dhuG7Z4I61qn16SJgtFaLI5ybauUQT+m/5B1VhkfIy66AyVhdLA27DCMenxUPIRMtk8sqjWEfZ+jdxl+6m571zCNE2GWxaM6ibBnQNL5DqjC8TQUNqwElQQ7IaUnBlzVs1k5UmIopehVOXz6tz4euLTWzEvCU7r+kVyABtVPKUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=C5syqY0R; 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="C5syqY0R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D384A1F000E9; Thu, 28 May 2026 08:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779955882; bh=hUTLtCDZjsxWDG3zKtFm8xvEviJKYydHQ8jhj8AFbk0=; h=Subject:To:Cc:From:Date; b=C5syqY0RNy6FMMSPKkCbtNq2PrQbMi2eJNMkIo8OnD8IKJfOtFoSkXyVvYtGsmPQX 9Zebg8o4OW/OMLVrSCqMh7q5goMdo6aclOOpaglZBl4OsILyhp+cDfWyyWPyK8PoU4 LmO8MiyVHruEoVZc6/sFEgHurPPnQtcTwWtvzejQ= Subject: FAILED: patch "[PATCH] smb: client: require net admin for CIFS SWN netlink" failed to apply to 6.6-stable tree To: michael.bommarito@gmail.com,stfrench@microsoft.com Cc: From: Date: Thu, 28 May 2026 10:10:29 +0200 Message-ID: <2026052829-prewashed-duct-fb51@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x d1ebfce2c1d161186a82e77590bf7da2ea1bce91 # git commit -s git send-email --to '' --in-reply-to '2026052829-prewashed-duct-fb51@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From d1ebfce2c1d161186a82e77590bf7da2ea1bce91 Mon Sep 17 00:00:00 2001 From: Michael Bommarito Date: Sun, 17 May 2026 20:11:50 -0400 Subject: [PATCH] smb: client: require net admin for CIFS SWN netlink CIFS_GENL_CMD_SWN_NOTIFY is the userspace witness-notify command. The intended sender is the cifs.witness helper, but the generic-netlink operation currently has no capability flag, so any local process can send RESOURCE_CHANGE or CLIENT_MOVE notifications to the in-kernel witness handler. The same family exposes CIFS_GENL_MCGRP_SWN without multicast-group capability flags. Register messages sent to that group include the witness registration id and, for NTLM-authenticated mounts, the username, domain, and password attributes copied from the CIFS session. An unprivileged local process should not be able to join that group and receive those messages. Require CAP_NET_ADMIN for incoming SWN_NOTIFY commands with GENL_ADMIN_PERM, and require CAP_NET_ADMIN over the network namespace for joining the SWN multicast group with GENL_MCAST_CAP_NET_ADMIN. The cifs.witness service runs with the privileges needed for both operations. Fixes: fed979a7e082 ("cifs: Set witness notification handler for messages from userspace daemon") Cc: stable@vger.kernel.org Signed-off-by: Michael Bommarito Assisted-by: Claude:claude-opus-4-7 Signed-off-by: Steve French diff --git a/fs/smb/client/netlink.c b/fs/smb/client/netlink.c index 147d9409252c..0dd10913c37a 100644 --- a/fs/smb/client/netlink.c +++ b/fs/smb/client/netlink.c @@ -33,13 +33,17 @@ static const struct nla_policy cifs_genl_policy[CIFS_GENL_ATTR_MAX + 1] = { static const struct genl_ops cifs_genl_ops[] = { { .cmd = CIFS_GENL_CMD_SWN_NOTIFY, + .flags = GENL_ADMIN_PERM, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .doit = cifs_swn_notify, }, }; static const struct genl_multicast_group cifs_genl_mcgrps[] = { - [CIFS_GENL_MCGRP_SWN] = { .name = CIFS_GENL_MCGRP_SWN_NAME }, + [CIFS_GENL_MCGRP_SWN] = { + .name = CIFS_GENL_MCGRP_SWN_NAME, + .flags = GENL_MCAST_CAP_NET_ADMIN, + }, }; struct genl_family cifs_genl_family = {