<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/smb/server/connection.h, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-09T02:25:16Z</updated>
<entry>
<title>ksmbd: add procfs interface for runtime monitoring and statistics</title>
<updated>2026-02-09T02:25:16Z</updated>
<author>
<name>Bahubali B Gumaji</name>
</author>
<published>2026-02-05T00:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b38f99c1217ae04753340f0fdcd8f35bf56841dc'/>
<id>urn:sha1:b38f99c1217ae04753340f0fdcd8f35bf56841dc</id>
<content type='text'>
This patch introduces a /proc filesystem interface to ksmbd, providing
visibility into the internal state of the SMB server. This allows
administrators and developers to monitor active connections, user
sessions, and opened files in real-time without relying on external
tools or heavy debugging.

Key changes include:
 - Connection Monitoring (/proc/fs/ksmbd/clients): Displays a list of
   active network connections, including client IP addresses, SMB dialects,
   credits, and last active timestamps.

 - Session Management (/proc/fs/ksmbd/sessions/): Adds a global sessions
   file to list all authenticated users and their session IDs.

 - Creates individual session entries (e.g., /proc/fs/ksmbd/sessions/&lt;id&gt;)
   detailing capabilities (DFS, Multi-channel, etc.), signing/encryption
   algorithms, and connected tree shares.

 - File Tracking (/proc/fs/ksmbd/files): Shows all currently opened files
   across the server, including tree IDs, process IDs (PID), access modes
   (daccess/saccess), and oplock/lease states.

 - Statistics &amp; Counters: Implements internal counters for global server
   metrics, such as the number of tree connections, total sessions, and
   processed read/write bytes.

Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Bahubali B Gumaji &lt;bahubali.bg@samsung.com&gt;
Signed-off-by: Sang-Soo Lee  &lt;constant.lee@samsung.com&gt;
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: replace connection list with hash table</title>
<updated>2025-10-01T02:37:55Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-10-01T00:55:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0bcc831be535269556f59cb70396f7e34f03a276'/>
<id>urn:sha1:0bcc831be535269556f59cb70396f7e34f03a276</id>
<content type='text'>
Replace connection list with hash table to improve lookup performance.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: server: make use of common smbdirect.h</title>
<updated>2025-09-28T23:29:51Z</updated>
<author>
<name>Stefan Metzmacher</name>
</author>
<published>2025-08-06T17:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7de2c4521ce86eb23de133cdf48cb460cff5a91'/>
<id>urn:sha1:e7de2c4521ce86eb23de133cdf48cb460cff5a91</id>
<content type='text'>
Cc: Steve French &lt;smfrench@gmail.com&gt;
Cc: Tom Talpey &lt;tom@talpey.com&gt;
Cc: Long Li &lt;longli@microsoft.com&gt;
Cc: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Cc: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Cc: Meetakshi Setiya &lt;meetakshisetiyaoss@gmail.com&gt;
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&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: extend the connection limiting mechanism to support IPv6</title>
<updated>2025-08-17T23:23:22Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-08-17T00:48:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0d41112f1a5828c194b59cca953114bc3776ef2'/>
<id>urn:sha1:c0d41112f1a5828c194b59cca953114bc3776ef2</id>
<content type='text'>
Update the connection tracking logic to handle both IPv4 and IPv6
address families.

Cc: stable@vger.kernel.org
Fixes: e6bb91939740 ("ksmbd: limit repeated connections from clients with the same IP")
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: limit repeated connections from clients with the same IP</title>
<updated>2025-08-07T23:22:58Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-08-05T09:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6bb9193974059ddbb0ce7763fa3882bd60d4dc3'/>
<id>urn:sha1:e6bb9193974059ddbb0ce7763fa3882bd60d4dc3</id>
<content type='text'>
Repeated connections from clients with the same IP address may exhaust
the max connections and prevent other normal client connections.
This patch limit repeated connections from clients with the same IP.

Reported-by: tianshuo han &lt;hantianshuo233@gmail.com&gt;
Cc: stable@vger.kernel.org
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: add free_transport ops in ksmbd connection</title>
<updated>2025-06-17T21:26:44Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-06-10T09:52:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a89f5fae998bdc4d0505306f93844c9ae059d50c'/>
<id>urn:sha1:a89f5fae998bdc4d0505306f93844c9ae059d50c</id>
<content type='text'>
free_transport function for tcp connection can be called from smbdirect.
It will cause kernel oops. This patch add free_transport ops in ksmbd
connection, and add each free_transports for tcp and smbdirect.

Fixes: 21a4e47578d4 ("ksmbd: fix use-after-free in __smb2_lease_break_noti()")
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
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: provide zero as a unique ID to the Mac client</title>
<updated>2025-05-27T15:25:12Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-05-21T00:02:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=571781eb7ffefa65b0e922c8031e42b4411a40d4'/>
<id>urn:sha1:571781eb7ffefa65b0e922c8031e42b4411a40d4</id>
<content type='text'>
The Mac SMB client code seems to expect the on-disk file identifier
to have the semantics of HFS+ Catalog Node Identifier (CNID).
ksmbd provides the inode number as a unique ID to the client,
but in the case of subvolumes of btrfs, there are cases where different
files have the same inode number, so the mac smb client treats it
as an error. There is a report that a similar problem occurs
when the share is ZFS.
Returning UniqueId of zero will make the Mac client to stop using and
trusting the file id returned from the server.

Reported-by: Justin Turner Arthur &lt;justinarthur@gmail.com&gt;
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 null pointer dereference in alloc_preauth_hash()</title>
<updated>2025-04-02T04:02:20Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-04-02T00:11:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8b5b7c5da7d0c31c9b7190b4a7bba5281fc4780'/>
<id>urn:sha1:c8b5b7c5da7d0c31c9b7190b4a7bba5281fc4780</id>
<content type='text'>
The Client send malformed smb2 negotiate request. ksmbd return error
response. Subsequently, the client can send smb2 session setup even
thought conn-&gt;preauth_info is not allocated.
This patch add KSMBD_SESS_NEED_SETUP status of connection to ignore
session setup request if smb2 negotiate phase is not complete.

Cc: stable@vger.kernel.org
Tested-by: Steve French &lt;stfrench@microsoft.com&gt;
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-26505
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: prevent connection release during oplock break notification</title>
<updated>2025-03-10T17:54:32Z</updated>
<author>
<name>Namjae Jeon</name>
</author>
<published>2025-03-06T05:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3aa660c059240e0c795217182cf7df32909dd917'/>
<id>urn:sha1:3aa660c059240e0c795217182cf7df32909dd917</id>
<content type='text'>
ksmbd_work could be freed when after connection release.
Increment r_count of ksmbd_conn to indicate that requests
are not finished yet and to not release the connection.

Cc: stable@vger.kernel.org
Reported-by: Norbert Szetei &lt;norbert@doyensec.com&gt;
Tested-by: Norbert Szetei &lt;norbert@doyensec.com&gt;
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 broken transfers when exceeding max simultaneous operations</title>
<updated>2024-12-16T04:20:03Z</updated>
<author>
<name>Marios Makassikis</name>
</author>
<published>2024-12-14T03:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43fb7bce8866e793275c4f9f25af6a37745f3416'/>
<id>urn:sha1:43fb7bce8866e793275c4f9f25af6a37745f3416</id>
<content type='text'>
Since commit 0a77d947f599 ("ksmbd: check outstanding simultaneous SMB
operations"), ksmbd enforces a maximum number of simultaneous operations
for a connection. The problem is that reaching the limit causes ksmbd to
close the socket, and the client has no indication that it should have
slowed down.

This behaviour can be reproduced by setting "smb2 max credits = 128" (or
lower), and transferring a large file (25GB).

smbclient fails as below:

  $ smbclient //192.168.1.254/testshare -U user%pass
  smb: \&gt; put file.bin
  cli_push returned NT_STATUS_USER_SESSION_DELETED
  putting file file.bin as \file.bin smb2cli_req_compound_submit:
  Insufficient credits. 0 available, 1 needed
  NT_STATUS_INTERNAL_ERROR closing remote file \file.bin
  smb: \&gt; smb2cli_req_compound_submit: Insufficient credits. 0 available,
  1 needed

Windows clients fail with 0x8007003b (with smaller files even).

Fix this by delaying reading from the socket until there's room to
allocate a request. This effectively applies backpressure on the client,
so the transfer completes, albeit at a slower rate.

Fixes: 0a77d947f599 ("ksmbd: check outstanding simultaneous SMB operations")
Signed-off-by: Marios Makassikis &lt;mmakassikis@freebox.fr&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
