Giter Club home page Giter Club logo

ksmbd's People

Contributors

aiamadeus avatar amir73il avatar atheik avatar brainslayer avatar brauner avatar cathaysia avatar chaserhkj avatar ddiss avatar gibeomii-kim avatar gregkh avatar gustavoarsilva avatar hcbwiz avatar hclee avatar hexrabbit avatar intel-lab-lkp avatar jtlayton avatar launius avatar musamaanjum avatar namjaejeon avatar neheb avatar pankajs01 avatar sahrawatamit avatar sergey-senozhatsky avatar slowfranklin avatar tititiou36 avatar ttalpey avatar tymok avatar u1f383 avatar xdarklight avatar z00467499 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ksmbd's Issues

WARNING: "vfs_read" [path/file.ko] undefined!

can anyone help me with this issue? I am trying to insert the driver into one of the reference board using fedora 27 kernel version 4.14.7. The same process runs with kernel version 4.13.

Thank you

Symlinks

When will symlink support return? I've been using vers=1.0,unix with Samba but I'd like to switch to ksmbd and use vers=3.1.1,posix. Apparently SMB1 and symlink support has been removed from ksmbd in Linux 5.15-rc2. Can you provide those features for users that "don't care", perhaps behind a unsafe = yes option?

connection from old client fails with error "server challenge is not assigned in negotiate"

Hello,

I have an old SMB client which unfortunately cannot connect to ksmbd

ksmbd: ksmbd_kthread_fn:289: connect success: accepted new connection
ksmbd: ksmbd_conn_handler_loop:314: RFC1002 header 47 bytes
ksmbd: check_smb1_hdr:32: got SMB
ksmbd: smb1_calc_size:196: SMB2 byte count 12, struct size : 0
ksmbd: smb1_calc_size:199: SMB1 len 47
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:219: client requested dialect NT LM 0.12
ksmbd: ksmbd_lookup_dialect_by_name:224: selected NT LM 0.12 dialect
ksmbd: ksmbd_smb_negotiate_common:477: conn->dialect 0x0
ksmbd: ksmbd_conn_handler_loop:314: RFC1002 header 271 bytes
ksmbd: check_smb1_hdr:32: got SMB
ksmbd: smb1_calc_size:196: SMB2 byte count 210, struct size : 26
ksmbd: smb1_calc_size:199: SMB1 len 271
ksmbd: smb_session_setup_andx:1263: New session ID: 19, Uid: 0
ksmbd: smb_session_setup_andx:1271: build response without extend_security
ksmbd: build_sess_rsp_noextsec:945: session setup request for user 
ksmbd: build_sess_rsp_noextsec:960: server challenge is not assigned in negotiate
ksmbd: __process_request:152: Failed to process 115 [-22]
ksmbd: ksmbd_conn_handler_loop:314: RFC1002 header 253 bytes
ksmbd: check_smb1_hdr:32: got SMB
ksmbd: smb1_calc_size:196: SMB2 byte count 192, struct size : 26
ksmbd: smb1_calc_size:199: SMB1 len 253
ksmbd: smb_session_setup_andx:1263: New session ID: 19, Uid: 0
ksmbd: smb_session_setup_andx:1271: build response without extend_security
ksmbd: build_sess_rsp_noextsec:945: session setup request for user 
ksmbd: build_sess_rsp_noextsec:960: server challenge is not assigned in negotiate
ksmbd: __process_request:152: Failed to process 115 [-22]

my server config:

[global]
...
        ipc timeout = 20
        deadtime = 15
        map to guest = Bad User
        smb2 max read = 64K
        smb2 max write = 64K
        smb2 max trans = 64K
        cache read buffers = no
        cache trans buffers = no

######### Dynamic written config options #########
        server min protocol = NT1
        server signing = disabled

... some shares with guest ok = true ...

I don't know if this is related but I found the following TODO in smb1pdu.c:875:

/* TODO: need to set spnego enable through smb.conf parameter */

also if it's somehow relevant: I'm running ksmbd on OpenWrt (master branch on a MIPS Big Endian SoC)

any help is appreciated. I can help testing patches or try to implement a workaround/fix myself if you point me in the right direction

Thank you!
Martin

ksmbd detect disk space incorrect

step to produce the issue:

mkdir /mnt
# mount tmpfs with size limit on 1MB on /mnt
mount -o size=1M -t tmpfs tmpfs /mnt

mkdir /mnt/sda4
mount -t ext4 /dev/sda4 /mnt/sda4
chmod 777 /mnt/sda4

smb config:

[mnt]
	path = /mnt
	create mask = 0666
	directory mask = 0777
	read only = no
	guest ok = yes

disk part sda4 size is 64GB
and then
I open \\192.168.16.1\mnt in windows 11
copy one 1GB-big-file to \\192.168.16.1\mnt\sda4\

then it displays no space enough error.

Network Shares show no files after 22.03.2 update

Had to reinstall the ksmbd packages after updating the firmware and maybe I didn't do something right. My shares are visible, the drives show a size of 9.75MB each and my files are not visible. I plugged the drives into my linux box and the files are fine. Has anyone had this?

Protocol freedom website

* http://protocolfreedom.org/

Looks like the protocol freedom domain has been taken over by a generic tech bog. Is there a better link to them the readme could point to instead ?
https://protocolfreedom.org/ <-- doesn't have any info about protocol freedom anymore. Cached versions in search engines also show the tech blog content so the change can't be too recent.

SMB2_TREE_CONNECT_HE fails to connect with the error -22

Hello,
I'm posting an issue about not being able to connect to a shared folder, the windows prompt permission denied with the following dmesg detailed output :

ksmbd: ksmbd_conn_handler_loop:314: RFC1002 header 170 bytes
ksmbd: ksmbd_verify_smb_message:150: got SMB2 command
ksmbd: smb2_calc_size:252: SMB2 data length 50 offset 120
ksmbd: smb2_calc_size:269: SMB2 len 170
ksmbd: smb2_set_rsp_credits:377: credits: requested[1] granted[1] total_granted[107]
ksmbd: ksmbd_conn_handler_loop:314: RFC1002 header 120 bytes
ksmbd: smb2_get_ksmbd_tcon:103: skip to check tree connect request
ksmbd: ksmbd_verify_smb_message:150: got SMB2 command
ksmbd: smb2_calc_size:252: SMB2 data length 48 offset 72
ksmbd: smb2_calc_size:269: SMB2 len 120
ksmbd: smb2_tree_connect:1717: tree connect request for tree tmp folder treename \192.168.2.1\tmp folder
ksmbd: __process_request:153: Failed to process 3 [-22]

ksmbd: smb2_set_rsp_credits:377: credits: requested[1] granted[1] total_granted[107]

looking in smb2pdu.h I found that the work method of the request with a given ID 3 belong to SMB2_TREE_CONNECT_HE

below the specs of the hardware and the configuration

`
softwate specs :
OS : OPENWRT
ksmbd-tools version : 3.3.3
cifsd version 3.3.3

Hardware specs :
kernel ARCH : aarch64
Userspace arch : arm

cat /proc/cpuinfo :
processor : 0
cpu model : ARM
BogoMIPS : 100.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x42
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x100
CPU revision : 0
.....

smb.conf :

[global]
netbios name = OpenWrt
server string = Ksmbd on OpenWrt
workgroup = WORKGROUP
interfaces = BR_LAN
bind interfaces only = yes
ipc timeout = 20
deadtime = 15
map to guest = Bad User
smb2 max read = 64K
smb2 max write = 64K
smb2 max trans = 64K
cache read buffers = no
cache trans buffers = no

[tmp folder]
path = /tmp
valid users = ahmed
create mask = 0666
directory mask = 0777
read only = no
guest ok = no
inherit owner = yes
hide dot files = no`

Disappearing network share - Netgear D7800 v21.02

I am adding a problem found on the forum (Polish language) that has not been reported here.
My loose translation:

Compilation downloaded from the forum from luci. Attached NTFS drive. The share runs for 10-60 minutes after restart.
Later it stops working and is unavailable. I can browse from CLI via SSH but on 2 computers with Win10 share it becomes unavailable. Restarting the router helps.
The only thing I can see in the logs is:
SysLog:

Thu Oct 28 19:26:50 2021 daemon.err odhcp6c[1624]: Failed to send SOLICIT message to ff02::1:2 (Permission denied)
Thu Oct 28 19:27:31 2021 kern.err kernel: [ 314.609830] ksmbd: parse_sec_desc:814: parse_sec_desc: Error -22 mapping Owner SID to uid
Thu Oct 28 19:27:31 2021 kern.err kernel: [ 314.609860] ksmbd: parse_sec_desc:829: parse_sec_desc: Error -22 mapping Group SID to gid
Thu Oct 28 19:28:48 2021 daemon.err odhcp6c[1624]: Failed to send SOLICIT message to ff02::1:2 (Permission denied)

Kernel Log:

[ 314.609860] ksmbd: parse_sec_desc:829: parse_sec_desc: Error -22 mapping Group SID to gid
[ 3101.260181] ksmbd: __ipc_heartbeat:835: No IPC daemon response for 20s

I observe the same behavior when connected via eSATA and USB3.0.

The original post is available at the forum link provided above.

got 30816 err on windows side

server : centos 7 ,kernel 5.4.2
client 1: windows 10 error
client 2: centos 7 ,everything is ok.

client side error message on windows 10 :
event 30816
The server does not support any dialect that the client is trying to negotiate, such as the client has SMB2/SMB3 disabled and the server has SMB1 disabled.

Lot of ksmbd: v5 version is not supported when accessing from Win 11

When I write files in Android Studio from Win 11, I got a lot of logs saying ksmbd: v5 version is not supported

$ dmesg
...
[68971.766914] ksmbd: v5 version is not supported
[68971.779808] ksmbd: v5 version is not supported
[68971.871544] ksmbd: v5 version is not supported
[68971.910135] ksmbd: v5 version is not supported
[68971.914629] ksmbd: v5 version is not supported
[68971.935415] ksmbd: v5 version is not supported
[68971.946726] ksmbd: v5 version is not supported
[68972.011342] ksmbd: v5 version is not supported
[68972.015847] ksmbd: v5 version is not supported
[68972.074336] ksmbd: v5 version is not supported
[68972.096809] ksmbd: v5 version is not supported
[68972.140220] ksmbd: v5 version is not supported
[68972.144728] ksmbd: v5 version is not supported
[68972.157770] ksmbd: v5 version is not supported
[68972.298883] ksmbd: v5 version is not supported
[68972.336880] ksmbd: v5 version is not supported
[68972.341372] ksmbd: v5 version is not supported
[68972.354237] ksmbd: v5 version is not supported
[68972.444295] ksmbd: v5 version is not supported
[68972.483083] ksmbd: v5 version is not supported
[68972.487582] ksmbd: v5 version is not supported
[68972.500537] ksmbd: v5 version is not supported
[68972.591867] ksmbd: v5 version is not supported
[68972.630260] ksmbd: v5 version is not supported
[68972.634761] ksmbd: v5 version is not supported
[68972.647755] ksmbd: v5 version is not supported
[68972.711020] ksmbd: v5 version is not supported
[68972.786534] ksmbd: v5 version is not supported

The server is running arch linux kernel 5.15.76 and ksmbd-tools is version 3.4.6.

$ uname -a
Linux 5.15.76-2-rpi-ARCH #1 SMP PREEMPT Wed Nov 2 06:56:04 MDT 2022 aarch64 GNU/Linux
$ pacman -Qi ksmbd-tools
Name            : ksmbd-tools
Version         : 3.4.6-2

Fedora 32 server and WIN10 client use SMB direct failed

hi, I build ksmbd and ksmbd-tools in Fedora 32 (kernel version is 5.6.6-300.fc32.x86_64) with mellanox cx-5 RDMA network adapter. I use windows 10 client to connect to Fedora server. But I found that RDMA did not work. I still saw network traffic in TASK MANAGER in windows 10 client. I am wondering whether smb direct is working properly.

Total credits overflow: 1 for SMB 2.0.2

ksmbd 3.4.4

Problem:
I have HP Color LaserJet MFP M281fdn.
CONFIG_SMB_INSECURE_SERVER must be enabled (negotiation starts with SMB1).
When trying to scan from the printer to a network share, ksmbd reports

Total credits overflow: 1

Proposed solution:
Add
.max_credits = SMB2_MAX_CREDITS,
into
static struct smb_version_values smb20_server_values

Attached is a pcap after patch has been applied (192.168.20.108 is the printer, 192.168.20.5 is ksmbd)
M281fdn-Samba-test.zip

foobar2000 not working correctly

This is the error from foobar2000's console

Folder watching failure: The specified server cannot perform the requested operation.  
Watching: X:\

I have no idea how this is implemented.

hosts allow permits any login

Hello,

after adding a "hosts allow" statement I can not login anymore ...
I'm running Debian bullseye.

[data] comment = common data share path = /dataPool/data hosts allow = '192.168.200.0/24 192.168.100.0/24

systemctl restart ksmbd -> unusual messages
May 23 11:13:37 pve ksmbd[20051]: [ksmbd-worker/20051]: INFO: Drop non-existing user '192.168.200.0/24'
May 23 11:13:37 pve ksmbd[20051]: [ksmbd-worker/20051]: INFO: Drop non-existing user 192.168.100.0/24''

"." files are not deleted via explorer on mounted share.

I just tried to delete my test portableapps folder and noticed that's not possible. I tried delete via explorer on my top-folder and some files/folders will remain. They are also still visible via sftp, so its not some caching issue on windows.

Seems "." files are not deleted, maybe related to the hide dot files option.

root@router:/mnt/sda/2# ls -RA
.:
PortableApps

./PortableApps:
.nomedia         FirefoxPortable

./PortableApps/FirefoxPortable:
Data

./PortableApps/FirefoxPortable/Data:
profile

./PortableApps/FirefoxPortable/Data/profile:
storage

./PortableApps/FirefoxPortable/Data/profile/storage:
permanent

./PortableApps/FirefoxPortable/Data/profile/storage/permanent:
chrome

./PortableApps/FirefoxPortable/Data/profile/storage/permanent/chrome:
.metadata     .metadata-v2

macos client empty share (invisible)

Hello,

I am trying to mount some ksmbd share on a macos (12.3.1) client, and encounter a very strange issue.

Some directories on root of the share are invisible. I thank that it was a permission issue, but it is not...
With a windows client and the same share, i have no issue.

I tried to tweak some params on /etc/nsmb.conf (on macos) to force SMB2, SMB3, etc... no way, always the same issue.

I have no particular kernel log message on ksmbd server. Only these messages on ksmbd service startup :
ksmbd: Failed to bind socket: -98
ksmbd: Failed to shutdown socket: -107

I am running the very last kernel 5.17.1, but i had the same issue with my previous kernel 5.16.4.

Any suggestions ?

thanks

some errors while trying to access/stream files

I get those errors while trying to stream/access movie files via a Win10 mounted share. The streaming seems to work, even with those errors. Those happen every-time the media player opens the file for the first time.

kern.err kernel: [155671.337050] kcifsd: smb2_lock:5918: the end offset(ffffffffffffffff) is smaller than the start offset(0)
kern.err kernel: [155671.346691] kcifsd: smb2_lock:6164: failed in taking lock(flags : 1)
kern.err kernel: [155671.393032] kcifsd: smb2_lock:5918: the end offset(ffffffffffffffff) is smaller than the start offset(0)
kern.err kernel: [155671.402664] kcifsd: smb2_lock:6164: failed in taking lock(flags : 1)
kern.err kernel: [155811.193596] kcifsd: smb2_open:2521: failed to find stream name in xattr, rc : -2
kern.err kernel: [155811.906263] kcifsd: buffer_check_err:3405: Buffer Overflow
kern.err kernel: [155811.977204] kcifsd: buffer_check_err:3405: Buffer Overflow
kern.err kernel: [155811.984580] kcifsd: buffer_check_err:3405: Buffer Overflow
kern.err kernel: [155811.992401] kcifsd: buffer_check_err:3405: Buffer Overflow

PS: I use the master branch.

compile errors on CONFIG_CIFSD_ACL

Getting compile errors if enabled:

smb2pdu.o
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c: In function 'smb2_get_info_sec':
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4252:10: error: implicit declaration of function 'GET_FP_INODE'; did you mean 'FP_INODE'? [-Werror=implicit-function-declaration]
  inode = GET_FP_INODE(fp);
          ^~~~~~~~~~~~
          FP_INODE
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4252:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  inode = GET_FP_INODE(fp);
        ^
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c: In function 'smb2_set_info_sec':
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4530:21: error: 'fp' redeclared as different kind of symbol
  struct cifsd_file *fp;
                     ^~
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4525:49: note: previous definition of 'fp' was here
 static int smb2_set_info_sec(struct cifsd_file *fp, int addition_info,
                                                 ^~
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4536:6: error: 'addition_info' redeclared as different kind of symbol
  int addition_info;
      ^~~~~~~~~~~~~
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4525:57: note: previous definition of 'addition_info' was here
 static int smb2_set_info_sec(struct cifsd_file *fp, int addition_info,
                                                         ^~~~~~~~~~~~~
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4531:15: warning: unused variable 'pid' [-Wunused-variable]
  uint64_t id, pid;
               ^~~
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4531:11: warning: unused variable 'id' [-Wunused-variable]
  uint64_t id, pid;
           ^~
/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.c:4529:28: warning: unused variable 'rsp' [-Wunused-variable]
  struct smb2_set_info_rsp *rsp;
                            ^~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:327: /root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/smb2pdu.o] Error 1
make[3]: *** [Makefile:1533: _module_/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080] Error 2
make[3]: Leaving directory '/root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-4.14.97'
make[2]: *** [Makefile:58: /root/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/cifsd-2019-02-18-f6821080/.built] Error 2
make[2]: Leaving directory '/root/openwrt/feeds/extra/cifsd'
time: package/feeds/extra/cifsd/compile#1.11#0.30#1.36
make[1]: *** [package/Makefile:109: package/feeds/extra/cifsd/compile] Error 2
make[1]: Leaving directory '/root/openwrt'
make: *** [/root/openwrt/include/toplevel.mk:218: package/cifsd/compile] Error 2

PS: There is also "," missing in the smb2_set_info_sec() parameter-list.

add support for dkms

I am using Fedora, and it's kernel update is very frequent, so if there has not suppport of dkms, I must rebuild kernel module every when I update my kernel, and it's troublesome for me.

I had give a try for make a dkms, however, I failed. Can someone give me a hand? Or just add support in this repo?

Not working

C:\Windows\System32>net use Z: \\192.168.163.163\homes
Enter the user name for '192.168.163.163': Administrator
Enter the password for 192.168.163.163:
System error 86 has occurred.

The specified network password is not correct.

dmesg show:

[ 1765.006635] kcifsd: cifsd_parse_share_options:1207: [nor accessible] not supported
[root@build cifsd]# lsmod |grep cifs
cifsd                 303104  1
[root@build cifsd]# ps -ef |grep cifs
root      16765   1093  0 21:29 pts/0    00:00:00 cifsd
root      16766      2  0 21:29 ?        00:00:00 [kcifsd_main]

But no any sysfs

[root@build cifsd]# ls -al /sys/fs/cifsd
ls: cannot access /sys/fs/cifsd: No such file or directory
[root@build cifsd]# ls -al /sys/fs/
total 0
drwxr-xr-x  6 root root   0 Jul 27 21:47 .
dr-xr-xr-x 13 root root   0 Jul 27 20:59 ..
dr-xr-xr-x  2 root root   0 Jul 27 21:47 bpf
drwxr-xr-x 14 root root 360 Jul 27 20:59 cgroup
drwxr-xr-x  5 root root   0 Jul 27 21:47 ext4
drwxr-x---  2 root root   0 Jul 27 20:59 pstore

Seems not working at all (not save administrator user):

[root@build cifsd]# cifsadmin -a Administrator
New Password:
Retype Password:
[root@build cifsd]# cifsadmin -q Administrator
[Administrator] is not configured with cifsd

Build:

[ajb@build cifsd]$ make
make -C /home/ajb/rpmbuild/BUILD/kernel-ml-4.17.10/linux-4.17.10-1.el7.x86_64 M=/home/ajb/cifsd modules
make[1]: Entering directory `/home/ajb/rpmbuild/BUILD/kernel-ml-4.17.10/linux-4.17.10-1.el7.x86_64'

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /home/ajb/cifsd/unicode.o
  CC [M]  /home/ajb/cifsd/encrypt.o
  CC [M]  /home/ajb/cifsd/auth.o
  CC [M]  /home/ajb/cifsd/fh.o
  CC [M]  /home/ajb/cifsd/vfs.o
  CC [M]  /home/ajb/cifsd/misc.o
  CC [M]  /home/ajb/cifsd/smb1pdu.o
  CC [M]  /home/ajb/cifsd/smb1ops.o
  CC [M]  /home/ajb/cifsd/oplock.o
  CC [M]  /home/ajb/cifsd/netmisc.o
  CC [M]  /home/ajb/cifsd/netlink.o
  CC [M]  /home/ajb/cifsd/cifsacl.o
  CC [M]  /home/ajb/cifsd/management/user.o
  CC [M]  /home/ajb/cifsd/buffer_pool.o
  CC [M]  /home/ajb/cifsd/transport_tcp.o
  CC [M]  /home/ajb/cifsd/server.o
  CC [M]  /home/ajb/cifsd/smb2pdu.o
  CC [M]  /home/ajb/cifsd/smb2ops.o
  CC [M]  /home/ajb/cifsd/asn1.o
  LD [M]  /home/ajb/cifsd/cifsd.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/ajb/cifsd/cifsd.mod.o
  LD [M]  /home/ajb/cifsd/cifsd.ko
make[1]: Leaving directory `/home/ajb/rpmbuild/BUILD/kernel-ml-4.17.10/linux-4.17.10-1.el7.x86_64'
[ajb@build cifsd]$ exit
logout
[root@build cifsd]# insmod /home/ajb/cifsd/cifsd.ko
[ajb@build ~]$ lsmod |grep cifsd
cifsd                 303104  0

Make file:

[ajb@build ~]$ cat /home/ajb/cifsd/Makefile
KDIR=/home/ajb/rpmbuild/BUILD/kernel-ml-4.17.10/linux-4.17.10-1.el7.x86_64
ccflags-y       += -DCONFIG_CIFS_SMB2_SERVER=y
ccflags-y       += -DCONFIG_CIFS_SERVER=m

obj-m += cifsd.o

cifsd-y :=      export.o unicode.o encrypt.o auth.o \
                fh.o vfs.o misc.o smb1pdu.o smb1ops.o oplock.o netmisc.o \
                netlink.o cifsacl.o \
                management/user.o\
                buffer_pool.o \
                transport_tcp.o \
                server.o

cifsd-y += smb2pdu.o smb2ops.o asn1.o

all:
        make -C ${KDIR} M=$(PWD) modules
clean:
        make -C ${KDIR} M=$(PWD) clean

Extreme Load Averages

Decided to give this a go as samba4-libs didn't fit on my device.

After copying under 75mb total but 200 files from ubuntu, router would either reboot or display "IPC daemon response for 20s" . I had to reboot. probably. logread -f and monitoring top doesn't reveal anything. I did not have issues with playback or reading, but I primarily focused on being able to write.

[ 2116.732689] do_page_fault(): sending SIGSEGV to pool for invalid read access from 00424000
[ 2116.741059] epc = 77e9b850 in libc.so[77e24000+9c000]
[ 2116.746164] ra  = 0040772b in ksmbd.mountd[400000+12000]
[ 2117.772422] ksmbd: handle_startup_event:372: Reconnect to a new user space daemon
[ 2118.761145] Unable to close RPC pipe 2

• Copying a 3gb ubuntu iso from windows recieved a load average upwards of 80
• Deleting a directory with a lot of small files, ~200 items.
Load average: 184.87 57.69 20.27 3/340 4352
• Copying another 100mb file
• router rebooted
Mem: 100564K used, 22636K free, 268K shrd, 4668K buff, 60888K cached
CPU:   0% usr  99% sys   0% nic   0% idle   0% io   0% irq   0% sirq
Load average: 13.20 7.74 3.69 8/100 4417
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 4118     2 root     RW       0   0%  14% [ksmbd:8336]
 4176     2 root     RW       0   0%  14% [ksmbd:8340]
 4116     2 root     RW       0   0%  14% [ksmbd:8335]
 4188     2 root     RW       0   0%  14% [ksmbd:8345]
 4321     2 root     RW       0   0%  14% [ksmbd:8352]
 4395     2 root     RW       0   0%  14% [ksmbd:8356]
 4184     2 root     RW       0   0%  14% [ksmbd:8344]

• fresh reboot sometimes gets stuck, requiring reboot again 
• no one able to access any shares

For comparison if I transfer the same file via vsftpd the load stays at about 1~6.

I didn't want to go back to 19.07. I figured out how to extroot with a 512mb usb. Samba4-libs turns out to be 60mb by itself. Everything installed was under 200mb. My router only has 16mb...

With Samba4 the load was under 7. Copying 300 tiny files as before, flawless, load avg 2. No reboots.

OpenWRT 21.02 WNDR3800

unicode support?

Just got a report from a tester, who tried to rsync to a share.

rsync: mkstemp "/home/mangix/test/AccurateRip/Pop/2NE1/2nd Mini Album/.01 - 내가 제일 잘 나가 (I Am the Best).flac.YFQzKt" failed: No such file or directory (2)

kcifsd: check_invalid_char:143: found invalid character : 0x3f

Should this work or is this not yet supported? Maybe i missed some nls/iconv lib or build option?

ksmbd: Failed to send message: -32 kernel NULL pointer dereference

Hey, i'm running Archlinux (Kernel version: 5.18.2-arch1-1), and ksmbd to serve files to my other computers. Recently I will hear the fans start running full speed and X is unresponsive. When i look at dmesg i see this error and the system is semi-crashed, i'm going to switch back to samba and see if the problem resolves:

[11099.464495] usb 1-2.1: USB disconnect, device number 4
[11099.464503] usb 1-2.1.1: USB disconnect, device number 6
[11099.879428] usb 1-2.1.3: USB disconnect, device number 10
[18013.557728] [drm] DP Alt mode state on HPD: 1
[21888.639360] [drm] DP Alt mode state on HPD: 1
[32254.853120] [drm] DP Alt mode state on HPD: 1
[37054.109552] perf: interrupt took too long (2506 > 2500), lowering kernel.perf_event_max_sample_rate to 79800
[38906.599660] BUG: kernel NULL pointer dereference, address: 0000000000000015
[38906.599664] #PF: supervisor read access in kernel mode
[38906.599665] #PF: error_code(0x0000) - not-present page
[38906.599666] PGD 0 P4D 0
[38906.599668] Oops: 0000 [#1] PREEMPT SMP NOPTI
[38906.599669] CPU: 10 PID: 13263 Comm: kworker/10:1 Not tainted 5.18.2-arch1-1 #1 3d71b353df58e0aa4fcdc1730c70c1a91e7876b0
[38906.599672] Hardware name: SYSTEM_MANUFACTURER HX90/HX90, BIOS 5.19 10/11/2021
[38906.599673] Workqueue: ksmbd-io handle_ksmbd_work [ksmbd]
[38906.599683] RIP: 0010:smb2_open+0x112f/0x21d0 [ksmbd]
[38906.599692] Code: 7c 24 5b 00 0f 85 11 09 00 00 48 8d 94 24 a0 00 00 00 31 c0 b9 0e 00 00 00 48 89 d7 f3 ab 49 8b 43 20 83 60 60 f9 49 8b 46 08 <f6> 40 14 40 74 57 48 8b 84 24 90 00 00 00 4c 89 5c 24 48 44 89 44
[38906.599693] RSP: 0018:ffffaed3c4c7bcb8 EFLAGS: 00010202
[38906.599694] RAX: 0000000000000001 RBX: ffff9a69d7849740 RCX: 0000000000000000
[38906.599695] RDX: ffffaed3c4c7bd58 RSI: 0000000000000000 RDI: ffffaed3c4c7bd90
[38906.599696] RBP: ffff9a69fb95ce04 R08: 0000000000000000 R09: 0000000000000018
[38906.599696] R10: 00000000efe4b900 R11: ffff9a69d7ec3b80 R12: ffff9a69d8218000
[38906.599697] R13: 0000000000000009 R14: ffff9a69463dee00 R15: ffff9a697bed0c00
[38906.599698] FS:  0000000000000000(0000) GS:ffff9a702e880000(0000) knlGS:0000000000000000
[38906.599699] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[38906.599699] CR2: 0000000000000015 CR3: 00000007ad810000 CR4: 0000000000750ee0
[38906.599700] PKRU: 55555554
[38906.599701] Call Trace:
[38906.599702]  <TASK>
[38906.599705]  handle_ksmbd_work+0x147/0x3c0 [ksmbd ecd4837d804935c288b2b49ba8720c457310c578]
[38906.599713]  process_one_work+0x1c4/0x380
[38906.599716]  worker_thread+0x51/0x380
[38906.599717]  ? rescuer_thread+0x3a0/0x3a0
[38906.599718]  kthread+0xdb/0x110
[38906.599720]  ? kthread_complete_and_exit+0x20/0x20
[38906.599721]  ret_from_fork+0x1f/0x30
[38906.599724]  </TASK>
[38906.599725] Modules linked in: rfcomm nls_utf8 iptable_nat wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel vhost_net tun vhost vhost_iotlb macvtap macvlan tap xt_nat xt_tcpudp veth xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_addrtype nft_compat nf_tables libcrc32c nfnetlink br_netfilter bridge overlay ksmbd crc32_generic rdma_cm joydev mousedev iw_cm ib_cm hid_holtek_mouse ib_core cifs_arc4 cmac algif_hash 8021q garp algif_skcipher mrp af_alg stp llc bnep uas usb_storage ax88179_178a usbnet mii snd_sof_amd_renoir snd_sof_amd_acp intel_rapl_msr snd_sof_pci intel_rapl_common hid_cmedia snd_sof snd_usb_audio btusb snd_sof_utils snd_usbmidi_lib btrtl ledtrig_audio iwlmvm snd_rawmidi btbcm snd_soc_core edac_mce_amd btintel snd_seq_device mc usbhid btmtk snd_compress mac80211 bluetooth kvm_amd libarc4 ac97_bus ecdh_generic
[38906.599756]  snd_hda_codec_hdmi snd_pcm_dmaengine kvm snd_hda_intel iwlwifi snd_intel_dspcfg snd_intel_sdw_acpi vfat iwlmei fat snd_hda_codec irqbypass snd_acp_pci wmi_bmof crct10dif_pclmul snd_pci_acp6x snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel cfg80211 snd_pci_acp5x snd_pcm aesni_intel snd_rn_pci_acp3x snd_timer rfkill crypto_simd sp5100_tco snd snd_acp_config cryptd mei igc snd_soc_acpi tpm_crb rapl soundcore i2c_piix4 pcspkr snd_pci_acp3x ccp k10temp amd_sfh tpm_tis wmi cm32181 tpm_tis_core video tpm acpi_cpufreq industrialio i2c_hid_acpi rng_core mac_hid i2c_hid pinctrl_amd dm_multipath dm_mod crypto_user fuse bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme xhci_pci crc32c_intel nvme_core xhci_pci_renesas radeon amdgpu gpu_sched drm_ttm_helper ttm drm_dp_helper
[38906.599785] CR2: 0000000000000015
[38906.599786] ---[ end trace 0000000000000000 ]---
[38906.599786] RIP: 0010:smb2_open+0x112f/0x21d0 [ksmbd]
[38906.599794] Code: 7c 24 5b 00 0f 85 11 09 00 00 48 8d 94 24 a0 00 00 00 31 c0 b9 0e 00 00 00 48 89 d7 f3 ab 49 8b 43 20 83 60 60 f9 49 8b 46 08 <f6> 40 14 40 74 57 48 8b 84 24 90 00 00 00 4c 89 5c 24 48 44 89 44
[38906.599795] RSP: 0018:ffffaed3c4c7bcb8 EFLAGS: 00010202
[38906.599795] RAX: 0000000000000001 RBX: ffff9a69d7849740 RCX: 0000000000000000
[38906.599796] RDX: ffffaed3c4c7bd58 RSI: 0000000000000000 RDI: ffffaed3c4c7bd90
[38906.599797] RBP: ffff9a69fb95ce04 R08: 0000000000000000 R09: 0000000000000018
[38906.599797] R10: 00000000efe4b900 R11: ffff9a69d7ec3b80 R12: ffff9a69d8218000
[38906.599798] R13: 0000000000000009 R14: ffff9a69463dee00 R15: ffff9a697bed0c00
[38906.599799] FS:  0000000000000000(0000) GS:ffff9a702e880000(0000) knlGS:0000000000000000
[38906.599799] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[38906.599800] CR2: 0000000000000015 CR3: 00000007ad810000 CR4: 0000000000750ee0
[38906.599801] PKRU: 55555554
[38906.600306] ksmbd: Failed to send message: -32
[38906.600310] BUG: kernel NULL pointer dereference, address: 0000000000000015
[38906.600314] #PF: supervisor read access in kernel mode
[38906.600316] #PF: error_code(0x0000) - not-present page
[38906.600317] PGD 0 P4D 0
[38906.600319] Oops: 0000 [#2] PREEMPT SMP NOPTI
[38906.600320] CPU: 14 PID: 13119 Comm: kworker/14:4 Tainted: G      D           5.18.2-arch1-1 #1 3d71b353df58e0aa4fcdc1730c70c1a91e7876b0
[38906.600323] Hardware name: SYSTEM_MANUFACTURER HX90/HX90, BIOS 5.19 10/11/2021
[38906.600324] Workqueue: ksmbd-io handle_ksmbd_work [ksmbd]
[38906.600347] ksmbd: Failed to send message: -32
[38906.600341] RIP: 0010:smb2_open+0x112f/0x21d0 [ksmbd]
[38906.600353] Code: 7c 24 5b 00 0f 85 11 09 00 00 48 8d 94 24 a0 00 00 00 31 c0 b9 0e 00 00 00 48 89 d7 f3 ab 49 8b 43 20 83 60 60 f9 49 8b 46 08 <f6> 40 14 40 74 57 48 8b 84 24 90 00 00 00 4c 89 5c 24 48 44 89 44
[38906.600354] RSP: 0018:ffffaed3c641bcb8 EFLAGS: 00010202
[38906.600355] RAX: 0000000000000001 RBX: ffff9a69483010e0 RCX: 0000000000000000
[38906.600356] RDX: ffffaed3c641bd58 RSI: 0000000000000000 RDI: ffffaed3c641bd90
[38906.600357] RBP: ffff9a6a24e9c404 R08: 0000000000000000 R09: 0000000000000018
[38906.600358] R10: 0000000001f15400 R11: ffff9a6997e0de00 R12: ffff9a694f227a00
[38906.600358] R13: 0000000000000009 R14: ffff9a69463dee00 R15: ffff9a697bed0c00
[38906.600359] FS:  0000000000000000(0000) GS:ffff9a702e980000(0000) knlGS:0000000000000000
[38906.600361] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[38906.600361] CR2: 0000000000000015 CR3: 00000007ad810000 CR4: 0000000000750ee0
[38906.600362] PKRU: 55555554
[38906.600363] Call Trace:
[38906.600365]  <TASK>
[38906.600370]  handle_ksmbd_work+0x147/0x3c0 [ksmbd ecd4837d804935c288b2b49ba8720c457310c578]
[38906.600381]  process_one_work+0x1c4/0x380
[38906.600383]  worker_thread+0x51/0x380
[38906.600385]  ? rescuer_thread+0x3a0/0x3a0
[38906.600386]  kthread+0xdb/0x110
[38906.600388]  ? kthread_complete_and_exit+0x20/0x20
[38906.600390]  ret_from_fork+0x1f/0x30
[38906.600392]  </TASK>
[38906.600393] Modules linked in: rfcomm nls_utf8 iptable_nat wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel vhost_net tun vhost vhost_iotlb macvtap macvlan tap xt_nat xt_tcpudp veth xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_addrtype nft_compat nf_tables libcrc32c nfnetlink br_netfilter bridge overlay ksmbd crc32_generic rdma_cm joydev mousedev iw_cm ib_cm hid_holtek_mouse ib_core cifs_arc4 cmac algif_hash 8021q garp algif_skcipher mrp af_alg stp llc bnep uas usb_storage ax88179_178a usbnet mii snd_sof_amd_renoir snd_sof_amd_acp intel_rapl_msr snd_sof_pci intel_rapl_common hid_cmedia snd_sof snd_usb_audio btusb snd_sof_utils snd_usbmidi_lib btrtl ledtrig_audio iwlmvm snd_rawmidi btbcm snd_soc_core edac_mce_amd btintel snd_seq_device mc usbhid btmtk snd_compress mac80211 bluetooth kvm_amd libarc4 ac97_bus ecdh_generic
[38906.600433]  snd_hda_codec_hdmi snd_pcm_dmaengine kvm snd_hda_intel iwlwifi snd_intel_dspcfg snd_intel_sdw_acpi vfat iwlmei fat snd_hda_codec irqbypass snd_acp_pci wmi_bmof crct10dif_pclmul snd_pci_acp6x snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel cfg80211 snd_pci_acp5x snd_pcm aesni_intel snd_rn_pci_acp3x snd_timer rfkill crypto_simd sp5100_tco snd snd_acp_config cryptd mei igc snd_soc_acpi tpm_crb rapl soundcore i2c_piix4 pcspkr snd_pci_acp3x ccp k10temp amd_sfh tpm_tis wmi cm32181 tpm_tis_core video tpm acpi_cpufreq industrialio i2c_hid_acpi rng_core mac_hid i2c_hid pinctrl_amd dm_multipath dm_mod crypto_user fuse bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme xhci_pci crc32c_intel nvme_core xhci_pci_renesas radeon amdgpu gpu_sched drm_ttm_helper ttm drm_dp_helper
[38906.600463] CR2: 0000000000000015
[38906.600464] ---[ end trace 0000000000000000 ]---
[38906.600465] RIP: 0010:smb2_open+0x112f/0x21d0 [ksmbd]
[38906.600474] Code: 7c 24 5b 00 0f 85 11 09 00 00 48 8d 94 24 a0 00 00 00 31 c0 b9 0e 00 00 00 48 89 d7 f3 ab 49 8b 43 20 83 60 60 f9 49 8b 46 08 <f6> 40 14 40 74 57 48 8b 84 24 90 00 00 00 4c 89 5c 24 48 44 89 44
[38906.600475] RSP: 0018:ffffaed3c4c7bcb8 EFLAGS: 00010202
[38906.600476] RAX: 0000000000000001 RBX: ffff9a69d7849740 RCX: 0000000000000000
[38906.600477] RDX: ffffaed3c4c7bd58 RSI: 0000000000000000 RDI: ffffaed3c4c7bd90
[38906.600478] RBP: ffff9a69fb95ce04 R08: 0000000000000000 R09: 0000000000000018
[38906.600479] R10: 00000000efe4b900 R11: ffff9a69d7ec3b80 R12: ffff9a69d8218000
[38906.600479] R13: 0000000000000009 R14: ffff9a69463dee00 R15: ffff9a697bed0c00
[38906.600480] FS:  0000000000000000(0000) GS:ffff9a702e980000(0000) knlGS:0000000000000000
[38906.600481] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[38906.600482] CR2: 0000000000000015 CR3: 00000007ad810000 CR4: 0000000000750ee0
[38906.600483] PKRU: 55555554
[41308.836258] perf: interrupt took too long (3141 > 3132), lowering kernel.perf_event_max_sample_rate to 63600
[42173.159367] ksmbd: Failed to send message: -32
[44791.300179] [drm] DP Alt mode state on HPD: 1
[44792.462420] usb 1-2.1: new high-speed USB device number 11 using xhci_hcd
[44792.606456] usb 1-2.1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=92.23
[44792.606459] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[44792.606462] usb 1-2.1: Product: USB2.0 Hub
[44792.606463] usb 1-2.1: Manufacturer: GenesysLogic
[44792.670116] hub 1-2.1:1.0: USB hub found
[44792.670832] hub 1-2.1:1.0: 4 ports detected
[44832.019435] audit: type=1100 audit(1654907124.349:203): pid=14783 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_shells,pam_faillock,pam_permit,pam_faillock acct="jmoon" exe="/usr/bin/sshd" hostname=192.168.16.13 addr=192.168.16.13 terminal=ssh res=success'
[44832.024586] audit: type=1101 audit(1654907124.352:204): pid=14783 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="jmoon" exe="/usr/bin/sshd" hostname=192.168.16.13 addr=192.168.16.13 terminal=ssh res=success'
[44832.025082] audit: type=1103 audit(1654907124.352:205): pid=14783 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock acct="jmoon" exe="/usr/bin/sshd" hostname=192.168.16.13 addr=192.168.16.13 terminal=ssh res=success'
[44832.025123] audit: type=1006 audit(1654907124.352:206): pid=14783 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=3 res=1
[44832.025127] audit: type=1300 audit(1654907124.352:206): arch=c000003e syscall=1 success=yes exit=4 a0=3 a1=7ffd97ecf160 a2=4 a3=7ffd97ecee74 items=0 ppid=569 pid=14783 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="sshd" exe="/usr/bin/sshd" key=(null)
[44832.025130] audit: type=1327 audit(1654907124.352:206): proctitle=737368643A206A6D6F6F6E205B707269765D
[44832.061317] audit: type=1105 audit(1654907124.389:207): pid=14783 uid=0 auid=1000 ses=3 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env acct="jmoon" exe="/usr/bin/sshd" hostname=192.168.16.13 addr=192.168.16.13 terminal=ssh res=success'
[44832.062078] audit: type=1103 audit(1654907124.389:208): pid=14786 uid=0 auid=1000 ses=3 msg='op=PAM:setcred grantors=pam_shells,pam_faillock,pam_permit,pam_faillock acct="jmoon" exe="/usr/bin/sshd" hostname=192.168.16.13 addr=192.168.16.13 terminal=ssh res=success'
[44915.209565] audit: type=1101 audit(1654907207.539:209): pid=14806 uid=1000 auid=1000 ses=3 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="jmoon" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[44915.209985] audit: type=1110 audit(1654907207.539:210): pid=14806 uid=1000 auid=1000 ses=3 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[44915.210052] audit: type=1105 audit(1654907207.539:211): pid=14806 uid=1000 auid=1000 ses=3 msg='op=PAM:session_open grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'

ksmbd server with multiple users access issue on windows

When configuring ksmbd (3.4.2) server with multiple shares and users. Windows will use saved credentials of first connected user to connect to other SMB shares causing connection issue for other users. This because windows allows using one set of credentials at a time, per session.
Is there any fix to this issue ?
Thanks

Accessing Share form Windows 11

If SMB1 is enabled on Windows, I have access to all folders except for the one with many subfolders, which gives the memory error. If SMB1 is disabled, I can't access the router at all from Windows.

KSMBD, LLMNR and WSDD2, may be ?

First of all, thanks for great work.

So, may be it's worst to add to ksmbd LLMNR name resolution (IPv4, IPv6, multicast) and WS-Discovery neighborhood showng/browsing (WSDD2 daemon written at C - https://github.com/Netgear/wsdd2) as components.
What is your oppinion ?
That it would be possible by conf file values to turn each submodule (LLMNR and/or WSDD) on/off.

move smbd-team/smbd to cifsd-team/smbd-old and move namjaejeon/smbd to cifsd-team/smbd

First, it is possible to move cifsd-team/smbd to cifsd-team/smbd-archives (or cifsd-team/smbd-old)
and move namjaejeon/smbd to cifsd-team/smbd

Redirections will be here, no lost, you can see for previous links:

There was a change name "cifsd" to "smbd".
The main organization has not changed of name yet.
It is better to do this after the move from personal accounts.

The main project will be not a fork, it will be better ;)

After it, you can move the "cifsd-team/smbd-old" to your github profile or delete ;)

Thanks in advance.

Linked to:

ksmbd logging and ECONNREFUSED from smb client

Hello Namjae Jeon.

How are you? :)
There is an issue with SMB in ToMobile (sharing content from flip to moble device) function in flip.
When try to connect from mobile device, it received ECONNREFUSED error, connection can not be estabished.

Unusually, the results different depending on the type of interface, in p2p0, has problem but eth0 has no problem for samba connection. (ping is ok both interface)

Is there any idea about this issue?

In additionally, is there a way to leave a ksmbd log to file or tmpfs?
I want to get history of ksmbd like client connection information.

if exist, please share how to get log.

Thanks :)

move photo from capture one to cifsd NAS failed

Capture One is a photograph software similar to Lightroom,I use cifsd NAS as a external directory。I failed to move photos in Capture One internal directory (filed stored in local disk) to cifsd NAS external directory。While the same operation with samba NAS is ok。
However,copy/move/paste file to cifsd NAS using macOS Finder works very well。

cifsd version : 3.2.4
ksmbd-tools version : 3.2.6
Linux ubuntu 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

debug message:
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 128
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 152
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:55 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 152 rsp off = 184
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 0
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 105
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_info:4832: GOT query info request
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_info:4836: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_get_info_file:4436: Compound request set FID = 13
[Mon Aug 10 22:16:55 2020] ksmbd: get_file_all_info:4103: filename =
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:55 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 176 rcv off = 256 rsp off = 360
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 120
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 121
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:55 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:251: SMB2 data length 6 offset 96
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 102
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_dir:3583: Search pattern is RAW
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :65459, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:55 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 232 rsp off = 336
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 128
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 152
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:55 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:55 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 152 rsp off = 184
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 0
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 105
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_info:4832: GOT query info request
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_query_info:4840: GOT SMB2_O_INFO_FILESYSTEM
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:55 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 96 rcv off = 256 rsp off = 280
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:55 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:55 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 120
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_calc_size:269: SMB2 len 121
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:58 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:58 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_query_dir:3583: Search pattern is JPEG
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :65459, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:58 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:58 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 232 rsp off = 336
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:58 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:58 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.xmp
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 121
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :65459, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 232 rsp off = 336
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 160
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG/DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG/DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2610: can not get linux path for /media/disk2/photography/JPEG/DSC_4614.JPG, rc = -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_creat:2269: file does not exist, so creating
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_creat:2278: creating regular file
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 184 rsp off = 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 105
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_info:4832: GOT query info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_info:4836: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_info_file:4436: Compound request set FID = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 28 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 124
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is ._DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 256 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 14:14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 121
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :65459, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 232 rsp off = 336
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 14:14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 28 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 124
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is ._DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 256 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 14:14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 152 rsp off = 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 14:14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 152 rsp off = 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 105
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_info:4832: GOT query info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_info:4840: GOT SMB2_O_INFO_FILESYSTEM
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 96 rcv off = 256 rsp off = 280
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 14:14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5638: Received set info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5669: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5712: error while processing smb2 query rc = -13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 524288
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 524400 not 113 for cmd:9 mid:49898
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 0, len 524288
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[8] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 524288
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 524400 not 113 for cmd:9 mid:49906
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 524288, len 524288
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[8] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 2 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 98
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is *
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :1048399, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :1048399, next_offset : 112, data_count : 224
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :1048399, next_offset : 128, data_count : 352
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 786432
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 786544 not 113 for cmd:9 mid:49932
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 1048576, len 786432
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[12] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 262144
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 262256 not 113 for cmd:9 mid:49944
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 1835008, len 262144
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[4] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 2 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 98
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is *
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 1048688 not 113 for cmd:9 mid:49964
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 2097152, len 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 1048688 not 113 for cmd:9 mid:49980
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 3145728, len 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 1048688 not 113 for cmd:9 mid:49996
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 4194304, len 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 1048688 not 113 for cmd:9 mid:50012
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 5242880, len 1048576
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_data_area_len:217: data area larger than 128K: 784472
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 113
[Mon Aug 10 22:16:59 2020] ksmbd: ksmbd_smb2_check_message:433: cli req padded more than expected. Length 784584 not 113 for cmd:9 mid:50028
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6152: flags 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_write:6156: filename DSC_4614.JPG, offset 6291456, len 784472
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[12] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5638: Received set info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5669: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5712: error while processing smb2 query rc = -13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 160
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG/DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG/DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 184 rsp off = 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 74 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 170
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5638: Received set info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5645: Compound request set FID = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5669: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_rename:5028: setting FILE_RENAME_INFO
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG/.smbdeleteAAA6e6039b
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_rename:5093: new name /media/disk2/photography/JPEG/.smbdeleteAAA6e6039b
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 72 rcv off = 360 rsp off = 256
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 14:14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 14
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5638: Received set info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5669: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5712: error while processing smb2 query rc = -13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 176
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 200
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG/.smbdeleteAAA6e6039b
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG/.smbdeleteAAA6e6039b
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 200 rsp off = 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 1 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 97
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5638: Received set info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5645: Compound request set FID = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_info:5669: GOT SMB2_O_INFO_FILE
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 72 rcv off = 304 rsp off = 256
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context ExtA err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2517: get query maximal access context (timestamp : 281750966981630)
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context TWrp err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context AlSi err -2
[Mon Aug 10 22:16:59 2020] ksmbd: check_context_err:2089: find context QFid err -2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 152 rsp off = 184
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 0
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 105
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_info:4832: GOT query info request
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_info:4840: GOT SMB2_O_INFO_FILESYSTEM
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 96 rcv off = 256 rsp off = 280
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 24 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is DSC_4614.JPG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 80 rcv off = 248 rsp off = 232
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 0 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 121
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2392: share path len 24
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 104
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :65459, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 184 rcv off = 232 rsp off = 336
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4952: Compound request set FID = 13:13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 13
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:479: padding len 4
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 88
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_close:4964: volatile_id = 2
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 8 offset 120
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 128
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_get_name:663: absolute name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_open:2368: converted name = /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[1] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: is_chained_smb2_message:468: got SMB2 chained command
[Mon Aug 10 22:16:59 2020] ksmbd: init_chained_smb2_rsp:421: Compound req new_len = 152 rcv off = 128 rsp off = 152
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 2 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 98
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is *
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3588: Restart directory scan
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :1048399, next_offset : 112, data_count : 112
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_populate_readdir_entry:3279: info_level : 37, buf_len :1048399, next_offset : 112, data_count : 224
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:251: SMB2 data length 2 offset 96
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_calc_size:269: SMB2 len 98
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3583: Search pattern is *
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_query_dir:3585: Directory name is /media/disk2/photography/JPEG
[Mon Aug 10 22:16:59 2020] ksmbd: smb2_set_rsp_credits:374: credits: requested[256] granted[16] total_granted[512]

Issue with Accessing folder with many subfolders (NTFS)

NTFS USB HDD connected and mounted properly; I can see the contents of the hard disk on the mounted location. Though for the samba clients, I have the following:

Windows 11: If SMB1 is enabled on Windows I have access to all folders except for the one with many subfolders which gives the memory error. If SMB1 is disabled, I can't access the router at all from Windows.
Android: Can access all folders from x File Explorer.
Coreelec (minimal Linux-based OS for TV Box): the share mounts, but even while setting SMB client minimum version to 2, the folder with too many subfolders shows up empty. Other folders open with no problem.

Lowercase share name

Hello! thanks for this great module. So nice to not have to bundle a massive samba install!

I've noticed that shares are mounted with their names as full lowercase. i.e "SMB_Projects" will mount as "smb_projects"
Is there any way to change this behaviour so that the names from the config are preserved?

Thanks!
Jon

TODO

  1. OPEN BACKUP INDENT.
  2. replay for Multi-channel.
  3. symlink(reparse point), test using MKLINK.exe
  4. SMB-direct test with the latest RDMA hardwares.
  5. smb2 notify.
  6. Variable substitutions.

Cannot mount share when running under Big Endian system

On a little endian MIPS device, no problems.

On a big endian MIPS device, mounting locally or remotely results in

mount: mounting //127.0.0.1/Music on test failed: I/O error

The setup uses the same smb.conf file, same cifsdb file, and same filesystem (ext4).

/etc/passwd, /etc/group, and /etc/shadow have identical users.

Filesystem paths are the same (rsync'ed from one to the other).

mount.cifs version is 6.8 locally (router) and remotely (laptop).

ksmbd should detect if IPv6 support is enabled

Hi,

ksmbd reports the following error on my system: ksmbd: Can't create socket for ipv6, try ipv4: -97

This is expected though, because I have a custom kernel with IPv6 disabled (# CONFIG_IPV6 is not set or "ipv6.disable=1").
It would be nice if this could be detected and not logged as an error.

Otherwise it's working quite well, well done! :)

ksmbd : SMBv1 remote use after free due to dangling pointer left by ``smb_tree_disconnect``

Hi everyone,

Description

The ksmbd is vulnerable to a remotely triggerable Use After Free due to a
stale pointer when handling SMB_COM_TREE_DISCONNECT commands.

To be more precise the version SMBv1 of the executable which is currently NOT
supported by the upstream Linux kernel is vulnerable to the same vulnerability
traced as ZDI-22-1690.

// https://github.com/namjaejeon/ksmbd/smb1pdu.c#357
int smb_tree_disconnect(struct ksmbd_work *work)
{
	struct smb_hdr *req_hdr = (struct smb_hdr *)work->request_buf;
	struct smb_hdr *rsp_hdr = (struct smb_hdr *)work->response_buf;
	struct ksmbd_tree_connect *tcon = work->tcon;
	struct ksmbd_session *sess = work->sess;

	if (!tcon) {
		pr_err("Invalid tid %d\n", req_hdr->Tid);
		rsp_hdr->Status.CifsError = STATUS_NO_SUCH_USER;
		return -EINVAL;
	}

	ksmbd_close_tree_conn_fds(work);
	ksmbd_tree_conn_disconnect(sess, tcon);
	return 0;
}

Similarly to the bug discovered by @thalium 's team the smb_tree_disconnect
doesn't NULL out the work->tcon pointer leaving it dangling, providing the possibility
for an attacker to achieve a uaf.

Proposed fixes

Similarly to the commit c88d9195ac11b947a9f5c4347f545f352472de0a the fix seems trivial.

int smb_tree_disconnect(struct ksmbd_work *work)
{
//...

	ksmbd_close_tree_conn_fds(work);
	ksmbd_tree_conn_disconnect(sess, tcon);
	work->tcon = NULL;
        return 0;
}

P.S. I would highly appreciate the public acknowledgement of the vulnerability.

Thank you.
Angelos Taxiarchis Kalaitzidis

build error

Hello everyone,
I encountered error when building on Centos7.

make: Entering directory `/usr/src/kernels/3.10.0-327.el7.x86_64'
  CC [M]  /root/cifssrv//fh.o
/root/cifssrv//fh.c: In function ‘close_id’:
/root/cifssrv//fh.c:425:3: error: too few arguments to function ‘vfs_unlink’
   err = vfs_unlink(dir->d_inode, dentry);
   ^
In file included from include/linux/compat.h:15:0,
                 from include/linux/ethtool.h:15,
                 from include/linux/netdevice.h:42,
                 from /root/cifssrv//glob.h:28,
                 from /root/cifssrv//fh.c:22:
include/linux/fs.h:1559:12: note: declared here
 extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
            ^
/root/cifssrv//fh.c: In function ‘cifssrv_check_stat_info’:
/root/cifssrv//fh.c:776:24: error: invalid operands to binary != (have ‘kuid_t’ and ‘kuid_t’)
  if (durable_stat->uid != current_stat->uid) {
                        ^
/root/cifssrv//fh.c:785:24: error: invalid operands to binary != (have ‘kgid_t’ and ‘kgid_t’)
  if (durable_stat->gid != current_stat->gid) {
                        ^
make[1]: *** [/root/cifssrv//fh.o] Error 1
make: *** [_module_/root/cifssrv/] Error 2
make: Leaving directory `/usr/src/kernels/3.10.0-327.el7.x86_64'

Could you show me your Makefile which can be easily used to build?
Thank you.

Ksmbd kernel-mode driver don' t start to due to errors of Unknown symbol.

There is Ubuntu 18.04 LTS x64 with kernel 5.4.0-84-generic x86_64 GNU/Linux.
I downloaded ksmbd and build it. by make.
It built successfully.
During starting by insmod ./ksmbd.ko there are 2 errors:
ksmbd: Unknown symbol des_encrypt (err -2)
ksmbd: Unknown symbol des_expand_key (err -2)

What is the resolving ?
What dependencies are additional necessary or what drivers must addtionally be loaded ?

Faulty timestamps

It's not the end of the world but I do like to have accurate timestamps. Not even Samba got it right either. I'll try to illustrate what I mean (let's assume every step happens one hour apart):

1. Create file in server

Server

Samba Samba unix ksmbd
Access 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Modify 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Change 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Birth ⚠️ ⚠️ 00:00 ✔️

Client

Samba Samba unix ksmbd
Access 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Modify 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Change 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Birth 00:00 ✔️ ⚠️ 00:00 ✔️

Windows

Samba Samba unix ksmbd
Created 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Modified 00:00 ✔️ 00:00 ✔️ 00:00 ✔️
Accessed 00:00 ✔️ 00:00 ✔️ 00:00 ✔️

2. Modify file in client

Server

Samba Samba unix ksmbd
Access 00:00 00:00 00:00
Modify 01:00 ✔️ 01:00 ✔️ 01:00 ✔️
Change 01:00 ✔️ 01:00 ✔️ 01:00 ✔️
Birth ⚠️ ⚠️ 00:00 ✔️

Client

Samba Samba unix ksmbd
Access 01:00 01:00 01:00
Modify 01:00 ✔️ 01:00 ✔️ 01:00 ✔️
Change 01:00 ✔️ 01:00 ✔️ 01:00 ✔️
Birth 01:00 ⚠️ ⚠️ 00:00 ✔️

Windows

Samba Samba unix ksmbd
Created 00:00 ✔️ 00:00 ✔️ 01:00 ❌
Modified 01:00 ✔️ 01:00 ✔️ 01:00 ✔️
Accessed 01:00 00:00 00:00

3. Modify file in client again

Server

Samba Samba unix ksmbd
Access 02:00 ✔️ 02:00 ✔️ 02:00 ✔️
Modify 02:01 ✔️ 02:01 ✔️ 02:01 ✔️
Change 02:01 ✔️ 02:01 ✔️ 02:01 ✔️
Birth ⚠️ ⚠️ 00:00 ✔️

Client

Samba Samba unix ksmbd
Access 02:01 ✔️ 02:01 ✔️ 02:01 ✔️
Modify 02:01 ✔️ 02:01 ✔️ 02:01 ✔️
Change 02:01 ✔️ 02:01 ✔️ 02:01 ✔️
Birth 00:00 ✔️ ⚠️ 00:00 ✔️

Windows

Samba Samba unix ksmbd
Created 02:00 ❌ 02:00 ❌ 02:01 ❌
Modified 02:01 ✔️ 02:01 ✔️ 02:00 ✔️
Accessed 02:00 ✔️ 02:00 ✔️ 02:00 ✔️

TLDR: Don't change the created timestamp (inside the extended file attributes).

ksmbd and WINS

This is question, not issue... does ksmbd has WINS nssswitch module (libwbclient), can it resolve WINS names?
If do so, what is directive?
Thx

how to access smb with one mouse click?

I am trying to open smb://192.168.15.1/ and it failed
but I have to open it with path: smb://192.168.15.1/share
where share is what I set in ksmbd config

it looks like samba4 could do that ? I am not sure.
say, open smb://192.168.15.1/ and it shows up share and then I could click it

can not insmod

$ sudo insmod /lib/modules/4.8.5/extra/cifssrv.ko
insmod: ERROR: could not insert module /lib/modules/4.8.5/extra/cifssrv.ko: Unknown symbol in module

$ dmesg
[ 192.966984] cifssrv: loading out-of-tree module taints kernel.
[ 192.967225] cifssrv: Unknown symbol sock_create (err 0)
[ 192.967288] cifssrv: Unknown symbol posix_unblock_lock (err 0)
[ 192.967345] cifssrv: Unknown symbol kern_path_create (err 0)
[ 192.967403] cifssrv: Unknown symbol kernel_accept (err 0)
[ 192.967462] cifssrv: Unknown symbol vfs_truncate (err 0)
[ 192.967521] cifssrv: Unknown symbol force_sig (err 0)
[ 192.967582] cifssrv: Unknown symbol locks_init_lock (err 0)
[ 192.967637] cifssrv: Unknown symbol netlink_capable (err 0)
[ 192.967700] cifssrv: Unknown symbol kernel_getpeername (err 0)
[ 192.967769] cifssrv: Unknown symbol vfs_lock_file (err 0)
[ 192.967832] cifssrv: Unknown symbol vfs_read (err 0)
[ 192.967902] cifssrv: Unknown symbol strnchr (err 0)
[ 192.967972] cifssrv: Unknown symbol done_path_create (err 0)

Server reset is in progress, can't start daemon

Hello Namjae Jeon.

How are you? :)
There is an issue with SMB in ToMobile (sharing content from flip to moble device) function in flip.
When try to connect secondly in iOS(AOS as well), connection can not be estabished.

it is supposed to work like

  • wifi connection -> Connect smb server -> successful connection -> ios device starts to receive packets from flip's smb server -> Receive packet successfully

but it works like below

  • We check wifi connection -> Connect smb server -> Get error code: "Error Domain=NEhotspotConfiguration Code=1"

One info is...

Normal case:
sh-3.2# ps ax | grep cifsd
3598 ? Ss 0:00 cifsd -n
3599 ? Sl 0:00 cifsd -n
3981 ? S+ 0:00 grep cifsd

Error case:
sh-3.2# ps ax | grep cifsd
4261 ? S+ 0:00 grep cifsd

In Server side in error case, below log is printed.

[3-2963.0879] ksmbd: handle_startup_event:371: Server reset is in progress, can't start daemon
[3-2963.0891] send signal SIG : 15, cifsd(6354)->cifsd(6354) handler:0001539d __send_signal

Is there any idea for this issue?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.