<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/fs/ksmbd/mgmt, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/fs/ksmbd/mgmt?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/fs/ksmbd/mgmt?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-05T06:15:44Z</updated>
<entry>
<title>ksmbd: validate share name from share config response</title>
<updated>2022-10-05T06:15:44Z</updated>
<author>
<name>Atte Heikkilä</name>
<email>atteh.mailbox@gmail.com</email>
</author>
<published>2022-10-02T23:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f5ba1cdaf5eb380e148183bda06d4844b457d095'/>
<id>urn:sha1:f5ba1cdaf5eb380e148183bda06d4844b457d095</id>
<content type='text'>
Share config response may contain the share name without casefolding as
it is known to the user space daemon. When it is present, casefold and
compare it to the share name the share config request was made with. If
they differ, we have a share config which is incompatible with the way
share config caching is done. This is the case when CONFIG_UNICODE is
not set, the share name contains non-ASCII characters, and those non-
ASCII characters do not match those in the share name known to user
space. In other words, when CONFIG_UNICODE is not set, UTF-8 share
names now work but are only case-insensitive in the ASCII range.

Signed-off-by: Atte Heikkilä &lt;atteh.mailbox@gmail.com&gt;
Acked-by: Tom Talpey &lt;tom@talpey.com&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: casefold utf-8 share names and fix ascii lowercase conversion</title>
<updated>2022-10-05T06:15:37Z</updated>
<author>
<name>Atte Heikkilä</name>
<email>atteh.mailbox@gmail.com</email>
</author>
<published>2022-09-15T13:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=16b5f54e30c1ddec36bdf946a299b3254aace477'/>
<id>urn:sha1:16b5f54e30c1ddec36bdf946a299b3254aace477</id>
<content type='text'>
strtolower() corrupts all UTF-8 share names that have a byte in the C0
(À ISO8859-1) to DE (Þ ISO8859-1) range, since the non-ASCII part of
ISO8859-1 is incompatible with UTF-8. Prevent this by checking that a
byte is in the ASCII range with isascii(), before the conversion to
lowercase with tolower(). Properly handle case-insensitivity of UTF-8
share names by casefolding them, but fallback to ASCII lowercase
conversion on failure or if CONFIG_UNICODE is not set. Refactor to move
the share name casefolding immediately after the share name extraction.
Also, make the associated constness corrections.

Signed-off-by: Atte Heikkilä &lt;atteh.mailbox@gmail.com&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: request update to stale share config</title>
<updated>2022-08-11T06:05:18Z</updated>
<author>
<name>Atte Heikkilä</name>
<email>atteh.mailbox@gmail.com</email>
</author>
<published>2022-08-08T22:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4963d74f8a6cc0eafd71d9ffc13e3a11ff1dd160'/>
<id>urn:sha1:4963d74f8a6cc0eafd71d9ffc13e3a11ff1dd160</id>
<content type='text'>
ksmbd_share_config_get() retrieves the cached share config as long
as there is at least one connection to the share. This is an issue when
the user space utilities are used to update share configs. In that case
there is a need to inform ksmbd that it should not use the cached share
config for a new connection to the share. With these changes the tree
connection flag KSMBD_TREE_CONN_FLAG_UPDATE indicates this. When this
flag is set, ksmbd removes the share config from the shares hash table
meaning that ksmbd_share_config_get() ends up requesting a share config
from user space.

Signed-off-by: Atte Heikkilä &lt;atteh.mailbox@gmail.com&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: return STATUS_BAD_NETWORK_NAME error status if share is not configured</title>
<updated>2022-08-11T06:05:18Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2022-08-08T12:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fe54833dc8d97ef387e86f7c80537d51c503ca75'/>
<id>urn:sha1:fe54833dc8d97ef387e86f7c80537d51c503ca75</id>
<content type='text'>
If share is not configured in smb.conf, smb2 tree connect should return
STATUS_BAD_NETWORK_NAME instead of STATUS_BAD_NETWORK_PATH.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: fix racy issue while destroying session on multichannel</title>
<updated>2022-08-01T04:14:32Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2022-07-25T04:36:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=af7c39d971e43cd0af488729bca362427ad99488'/>
<id>urn:sha1:af7c39d971e43cd0af488729bca362427ad99488</id>
<content type='text'>
After multi-channel connection with windows, Several channels of
session are connected. Among them, if there is a problem in one channel,
Windows connects again after disconnecting the channel. In this process,
the session is released and a kernel oop can occurs while processing
requests to other channels. When the channel is disconnected, if other
channels still exist in the session after deleting the channel from
the channel list in the session, the session should not be released.
Finally, the session will be released after all channels are disconnected.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: fix kernel oops from idr_remove()</title>
<updated>2022-07-27T04:38:05Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2022-07-22T01:17:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=17ea92a9f6d0b9a97aaec5ab748e4591d70a562c'/>
<id>urn:sha1:17ea92a9f6d0b9a97aaec5ab748e4591d70a562c</id>
<content type='text'>
There is a report that kernel oops happen from idr_remove().

kernel: BUG: kernel NULL pointer dereference, address: 0000000000000010
kernel: RIP: 0010:idr_remove+0x1/0x20
kernel:  __ksmbd_close_fd+0xb2/0x2d0 [ksmbd]
kernel:  ksmbd_vfs_read+0x91/0x190 [ksmbd]
kernel:  ksmbd_fd_put+0x29/0x40 [ksmbd]
kernel:  smb2_read+0x210/0x390 [ksmbd]
kernel:  __process_request+0xa4/0x180 [ksmbd]
kernel:  __handle_ksmbd_work+0xf0/0x290 [ksmbd]
kernel:  handle_ksmbd_work+0x2d/0x50 [ksmbd]
kernel:  process_one_work+0x21d/0x3f0
kernel:  worker_thread+0x50/0x3d0
kernel:  rescuer_thread+0x390/0x390
kernel:  kthread+0xee/0x120
kthread_complete_and_exit+0x20/0x20
kernel:  ret_from_fork+0x22/0x30

While accessing files, If connection is disconnected, windows send
session setup request included previous session destroy. But while still
processing requests on previous session, this request destroy file
table, which mean file table idr will be freed and set to NULL.
So kernel oops happen from ft-&gt;idr in __ksmbd_close_fd().
This patch don't directly destroy session in destroy_previous_session().
It just set to KSMBD_SESS_EXITING so that connection will be
terminated after finishing the rest of requests.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: add channel rwlock</title>
<updated>2022-07-27T04:38:05Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2022-07-22T01:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8e06b31e348107c5d78e2c90bb7e69388cb97fb6'/>
<id>urn:sha1:8e06b31e348107c5d78e2c90bb7e69388cb97fb6</id>
<content type='text'>
Add missing rwlock for channel list in session.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: replace sessions list in connection with xarray</title>
<updated>2022-07-27T04:38:05Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2022-07-22T01:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e4d3e6b524c0c928f7fc9e03e047885c4951ae60'/>
<id>urn:sha1:e4d3e6b524c0c928f7fc9e03e047885c4951ae60</id>
<content type='text'>
Replace sessions list in connection with xarray.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: remove unused ksmbd_share_configs_cleanup function</title>
<updated>2022-07-24T20:30:16Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2022-07-13T00:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1c90b54718fdea4f89e7e0c2415803f33f6d0b00'/>
<id>urn:sha1:1c90b54718fdea4f89e7e0c2415803f33f6d0b00</id>
<content type='text'>
remove unused ksmbd_share_configs_cleanup function.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ksmbd: fix multi session connection failure</title>
<updated>2021-12-29T04:47:22Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2021-12-15T05:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ce53d365378cde71bb6596d79c257e600d951d29'/>
<id>urn:sha1:ce53d365378cde71bb6596d79c257e600d951d29</id>
<content type='text'>
When RSS mode is enable, windows client do simultaneously send several
session requests to server. There is racy issue using
sess-&gt;ntlmssp.cryptkey on N connection : 1 session. So authetication
failed using wrong cryptkey on some session. This patch move cryptkey
to ksmbd_conn structure to use each cryptkey on connection.

Tested-by: Ziwei Xie &lt;zw.xie@high-flyer.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
