Bläddra i källkod

kernel: ksmbd: browse-interfaces-list-on-FSCTL_QUERY_INTERFACE_INFO

backport from kernel 6.12

ksmbd.mount will give each interfaces list and bind_interfaces_only flags
to ksmbd server. Previously, the interfaces list was sent only
when bind_interfaces_only was enabled.
ksmbd server browse only interfaces list given from ksmbd.conf on
FSCTL_QUERY_INTERFACE_INFO IOCTL.

Signed-off-by: Andrea Pesaresi <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20377
(cherry picked from commit 711e14af799c126f7be93228c395e4ac9518f131)
Link: https://github.com/openwrt/openwrt/pull/20442
Signed-off-by: Hauke Mehrtens <[email protected]>
Andrea Pesaresi 1 vecka sedan
förälder
incheckning
225b6724cd

+ 35 - 0
target/linux/generic/backport-6.6/540-v6.12-ksmbd-browse-interfaces-list-on-FSCTL_QUERY_INTERFACE_INFO.patch

@@ -0,0 +1,35 @@
+From 0fc403192dcc8def1f6284959141608ac4c86699 Mon Sep 17 00:00:00 2001
+From: Namjae Jeon <[email protected]>
+Date: Fri, 10 Jan 2025 13:37:05 +0900
+Subject: ksmbd: browse interfaces list on FSCTL_QUERY_INTERFACE_INFO IOCTL
+
+[ Upstream commit b2d99376c5d61eb60ffdb6c503e4b6c8f9712ddd ]
+
+ksmbd.mount will give each interfaces list and bind_interfaces_only flags
+to ksmbd server. Previously, the interfaces list was sent only
+when bind_interfaces_only was enabled.
+ksmbd server browse only interfaces list given from ksmbd.conf on
+FSCTL_QUERY_INTERFACE_INFO IOCTL.
+
+Signed-off-by: Namjae Jeon <[email protected]>
+Signed-off-by: Steve French <[email protected]>
+Stable-dep-of: 21a4e47578d4 ("ksmbd: fix use-after-free in __smb2_lease_break_noti()")
+Signed-off-by: Sasha Levin <[email protected]>
+---
+ fs/smb/server/ksmbd_netlink.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+(limited to 'fs/smb/server/ksmbd_netlink.h')
+
+--- a/fs/smb/server/ksmbd_netlink.h
++++ b/fs/smb/server/ksmbd_netlink.h
+@@ -108,7 +108,8 @@ struct ksmbd_startup_request {
+ 	__u32	smb2_max_credits;	/* MAX credits */
+ 	__u32	smbd_max_io_size;	/* smbd read write size */
+ 	__u32	max_connections;	/* Number of maximum simultaneous connections */
+-	__u32	reserved[126];		/* Reserved room */
++	__s8	bind_interfaces_only;
++	__s8	reserved[503];		/* Reserved room */
+ 	__u32	ifc_list_sz;		/* interfaces list size */
+ 	__s8	____payload[];
+ };