* FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree
@ 2026-07-14 14:47 gregkh
2026-07-15 1:58 ` ChenXiaoSong
0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2026-07-14 14:47 UTC (permalink / raw)
To: chenxiaosong, linkinjeon, stfrench; +Cc: stable
The patch below does not apply to the 6.1-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 <stable@vger.kernel.org>.
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.1.y
git checkout FETCH_HEAD
git cherry-pick -x 851ed9e09639e0daf79a506ce26097b296ed5518
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026071409-clamp-reminder-aacc@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 851ed9e09639e0daf79a506ce26097b296ed5518 Mon Sep 17 00:00:00 2001
From: ChenXiaoSong <chenxiaosong@kylinos.cn>
Date: Sun, 28 Jun 2026 07:42:43 +0000
Subject: [PATCH] smb/server: do not require delete access for non-replacing
links
Reproducer:
1. server: systemctl start ksmbd
2. client: mount -t cifs //${server_ip}/export /mnt
3. client: touch /mnt/file; ln /mnt/file /mnt/hardlink
4. client err log: ln: failed to create hard link 'hardlink' =>
'file': Permission denied
5. server err log: ksmbd: no right to delete : 0x80
Fixes: 13f3942f2bf4 ("ksmbd: add per-handle permission check to FILE_LINK_INFORMATION")
Cc: stable@vger.kernel.org
Reported-by: Steve French <stfrench@microsoft.com>
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 727ba86ede36..097f51fc7ed6 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -6921,16 +6921,18 @@ static int smb2_set_info_file(struct ksmbd_work *work, struct ksmbd_file *fp,
}
case FILE_LINK_INFORMATION:
{
- if (!(fp->daccess & FILE_DELETE_LE)) {
- pr_err("no right to delete : 0x%x\n", fp->daccess);
- return -EACCES;
- }
+ struct smb2_file_link_info *file_info;
if (buf_len < sizeof(struct smb2_file_link_info))
return -EMSGSIZE;
- return smb2_create_link(work, work->tcon->share_conf,
- (struct smb2_file_link_info *)buffer,
+ file_info = (struct smb2_file_link_info *)buffer;
+ if (file_info->ReplaceIfExists && !(fp->daccess & FILE_DELETE_LE)) {
+ pr_err("no right to delete : 0x%x\n", fp->daccess);
+ return -EACCES;
+ }
+
+ return smb2_create_link(work, work->tcon->share_conf, file_info,
buf_len, fp->filp,
work->conn->local_nls);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree
2026-07-14 14:47 FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree gregkh
@ 2026-07-15 1:58 ` ChenXiaoSong
2026-07-15 4:46 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: ChenXiaoSong @ 2026-07-15 1:58 UTC (permalink / raw)
To: gregkh, linkinjeon, stfrench; +Cc: stable
linux-6.1.y linux-6.6.y linux-6.12.y linux-6.18.y does not include the
bug-introducing patch: 13f3942f2bf4 ("ksmbd: add per-handle permission
check to FILE_LINK_INFORMATION").
On 7/14/26 22:47, gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 6.1-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<stable@vger.kernel.org>.
--
ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree
2026-07-15 1:58 ` ChenXiaoSong
@ 2026-07-15 4:46 ` Greg KH
2026-07-15 6:20 ` ChenXiaoSong
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2026-07-15 4:46 UTC (permalink / raw)
To: ChenXiaoSong; +Cc: linkinjeon, stfrench, stable
On Wed, Jul 15, 2026 at 09:58:10AM +0800, ChenXiaoSong wrote:
> linux-6.1.y linux-6.6.y linux-6.12.y linux-6.18.y does not include the
> bug-introducing patch: 13f3942f2bf4 ("ksmbd: add per-handle permission check
> to FILE_LINK_INFORMATION").
Ok, so what does that mean? Can you provide backported patches for
these branches?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree
2026-07-15 4:46 ` Greg KH
@ 2026-07-15 6:20 ` ChenXiaoSong
2026-07-17 1:37 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: ChenXiaoSong @ 2026-07-15 6:20 UTC (permalink / raw)
To: Greg KH; +Cc: linkinjeon, stfrench, stable
Okay, my team will do it.
On 7/15/26 12:46, Greg KH wrote:
> Ok, so what does that mean? Can you provide backported patches for
> these branches?
--
ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree
2026-07-15 6:20 ` ChenXiaoSong
@ 2026-07-17 1:37 ` Sasha Levin
0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2026-07-17 1:37 UTC (permalink / raw)
To: Greg KH; +Cc: Sasha Levin, linkinjeon, stfrench, stable, ChenXiaoSong
On Wed, Jul 15, 2026 at 02:20:42PM +0800, ChenXiaoSong wrote:
> Okay, my team will do it.
No need - the cherry-pick only failed because the released trees don't
have 13f3942f2bf4 ("ksmbd: add per-handle permission check to
FILE_LINK_INFORMATION") yet; that one is already queued for the next
6.18/6.12/6.6/6.1 releases. I've now queued 851ed9e09639 on top of it
in all four queues.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-17 1:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 14:47 FAILED: patch "[PATCH] smb/server: do not require delete access for non-replacing" failed to apply to 6.1-stable tree gregkh
2026-07-15 1:58 ` ChenXiaoSong
2026-07-15 4:46 ` Greg KH
2026-07-15 6:20 ` ChenXiaoSong
2026-07-17 1:37 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox