Skip to content

Commit d9f4284

Browse files
pesa1234jonasjelonek
authored andcommitted
kernel: 6.12-6.18: move ksmbd signing fix to backports
The multi-iov signing fix has moved from the SMB code-review tree to ksmbd-for-next. Move both patches from pending to backport, number them 502 so the v7.1 session teardown fix is applied first, and refresh them for the new ordering. Match the continuation-line indentation in the upstream commit. Link: smfrench/smb3-kernel@a4c06ff Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com> Link: openwrt#24804 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
1 parent c536030 commit d9f4284

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

target/linux/generic/pending-6.12/501-smb-server-fix-signing-multi-iov-response.patch renamed to target/linux/generic/backport-6.12/502-v7.3-smb-server-fix-signing-multi-iov-response.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From a99deddaa603c56e824e0916d433e7f7d3015f53 Mon Sep 17 00:00:00 2001
1+
From a4c06ff2eb66fc704582a443b47798a52c4303e2 Mon Sep 17 00:00:00 2001
22
From: ChenXiaoSong <chenxiaosong@kylinos.cn>
33
Date: Thu, 23 Jul 2026 04:11:29 +0000
44
Subject: [PATCH] smb/server: fix signing when a response uses more than one
@@ -25,7 +25,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
2525

2626
--- a/fs/smb/server/smb2pdu.c
2727
+++ b/fs/smb/server/smb2pdu.c
28-
@@ -9014,6 +9014,39 @@ int smb2_check_sign_req(struct ksmbd_wor
28+
@@ -9016,6 +9016,39 @@ int smb2_check_sign_req(struct ksmbd_wor
2929
}
3030

3131
/**
@@ -41,7 +41,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
4141
+ * Return: The first iovec to sign.
4242
+ */
4343
+static struct kvec *smb2_get_sign_rsp_iov(struct ksmbd_work *work,
44-
+ struct smb2_hdr *hdr, int *n_vec)
44+
+ struct smb2_hdr *hdr, int *n_vec)
4545
+{
4646
+ int i;
4747
+
@@ -65,7 +65,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
6565
* smb2_set_sign_rsp() - handler for rsp packet sign processing
6666
* @work: smb work containing notify command buffer
6767
*
68-
@@ -9023,18 +9056,13 @@ void smb2_set_sign_rsp(struct ksmbd_work
68+
@@ -9025,18 +9058,13 @@ void smb2_set_sign_rsp(struct ksmbd_work
6969
struct smb2_hdr *hdr;
7070
char signature[SMB2_HMACSHA256_SIZE];
7171
struct kvec *iov;
@@ -86,7 +86,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
8686

8787
if (!ksmbd_sign_smb2_pdu(work->conn, work->sess->sess_key, iov, n_vec,
8888
signature))
89-
@@ -9113,7 +9141,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
89+
@@ -9115,7 +9143,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
9090
struct channel *chann;
9191
char signature[SMB2_CMACAES_SIZE];
9292
struct kvec *iov;
@@ -95,7 +95,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
9595
char *signing_key;
9696

9797
hdr = ksmbd_resp_buf_curr(work);
98-
@@ -9135,12 +9163,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
98+
@@ -9137,12 +9165,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
9999
hdr->Flags |= SMB2_FLAGS_SIGNED;
100100
memset(hdr->Signature, 0, SMB2_SIGNATURE_SIZE);
101101

target/linux/generic/pending-6.18/501-smb-server-fix-signing-multi-iov-response.patch renamed to target/linux/generic/backport-6.18/502-v7.3-smb-server-fix-signing-multi-iov-response.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From a99deddaa603c56e824e0916d433e7f7d3015f53 Mon Sep 17 00:00:00 2001
1+
From a4c06ff2eb66fc704582a443b47798a52c4303e2 Mon Sep 17 00:00:00 2001
22
From: ChenXiaoSong <chenxiaosong@kylinos.cn>
33
Date: Thu, 23 Jul 2026 04:11:29 +0000
44
Subject: [PATCH] smb/server: fix signing when a response uses more than one
@@ -25,7 +25,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
2525

2626
--- a/fs/smb/server/smb2pdu.c
2727
+++ b/fs/smb/server/smb2pdu.c
28-
@@ -9072,6 +9072,39 @@ int smb2_check_sign_req(struct ksmbd_wor
28+
@@ -9074,6 +9074,39 @@ int smb2_check_sign_req(struct ksmbd_wor
2929
}
3030

3131
/**
@@ -41,7 +41,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
4141
+ * Return: The first iovec to sign.
4242
+ */
4343
+static struct kvec *smb2_get_sign_rsp_iov(struct ksmbd_work *work,
44-
+ struct smb2_hdr *hdr, int *n_vec)
44+
+ struct smb2_hdr *hdr, int *n_vec)
4545
+{
4646
+ int i;
4747
+
@@ -65,7 +65,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
6565
* smb2_set_sign_rsp() - handler for rsp packet sign processing
6666
* @work: smb work containing notify command buffer
6767
*
68-
@@ -9081,18 +9114,13 @@ void smb2_set_sign_rsp(struct ksmbd_work
68+
@@ -9083,18 +9116,13 @@ void smb2_set_sign_rsp(struct ksmbd_work
6969
struct smb2_hdr *hdr;
7070
char signature[SMB2_HMACSHA256_SIZE];
7171
struct kvec *iov;
@@ -86,7 +86,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
8686

8787
ksmbd_sign_smb2_pdu(work->conn, work->sess->sess_key, iov, n_vec,
8888
signature);
89-
@@ -9171,7 +9199,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
89+
@@ -9173,7 +9201,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
9090
struct channel *chann;
9191
char signature[SMB2_CMACAES_SIZE];
9292
struct kvec *iov;
@@ -95,7 +95,7 @@ Signed-off-by: Steve French <stfrench@microsoft.com>
9595
char *signing_key;
9696

9797
hdr = ksmbd_resp_buf_curr(work);
98-
@@ -9193,12 +9221,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
98+
@@ -9195,12 +9223,7 @@ void smb3_set_sign_rsp(struct ksmbd_work
9999
hdr->Flags |= SMB2_FLAGS_SIGNED;
100100
memset(hdr->Signature, 0, SMB2_SIGNATURE_SIZE);
101101

0 commit comments

Comments
 (0)