<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/fs/smb/server, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/fs/smb/server?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/fs/smb/server?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-08-23T15:41:36Z</updated>
<entry>
<title>Merge tag 'ksmbd-for-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb</title>
<updated>2026-08-23T15:41:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-23T15:41:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=61a09cfc121472013f99ae75066676739a5db626'/>
<id>urn:sha1:61a09cfc121472013f99ae75066676739a5db626</id>
<content type='text'>
Pull smb server updates from Namjae Jeon:
 "This contains server updates focused on SMB2 command sequencing, SMB3
  request replay and encryption, Apple Time Machine interoperability,
  protocol-compatibility fixes validated with smbtorture, security
  hardening, SMB Direct transport support, connection reliability, and
  other correctness improvements.

  New features:

   - Implement the SMB2 command sequence window

     Enforce the credit-based MessageId range for each connection,
     rejecting out-of-window, duplicate, and wrapped sequence numbers.
     This prevents invalid requests and same-channel replays from being
     processed

   - Add SMB3 request replay support

     SMB3 clients may resend requests with SMB2_FLAGS_REPLAY_OPERATION
     after a channel disconnect when the original response was lost.
     Track the required channel and open state to safely handle durable
     CREATE replays and make oplock, lease, and lock replays idempotent,
     avoiding duplicate state changes and improving multichannel
     reconnect reliability

   - Add opt-in Apple Time Machine support

     Implement the AAPL negotiation and related Finder, stream,
     COPYCHUNK, sparse-file, CHANGE_NOTIFY, and RPC compatibility
     required for Time Machine shares, allowing macOS backupd to use
     ksmbd for backups

   - Add per-share SMB3 encryption support

     Allow individual shares to require SMB3 encryption by advertising
     SMB2_SHAREFLAG_ENCRYPT_DATA in TREE_CONNECT responses and rejecting
     unencrypted tree connects and plaintext requests for protected
     shares

   - Add SMB Direct RDMA encryption support

     Extend SMB Direct to support SMB3 encrypted payloads over RDMA,
     with transform negotiation and encryption/decryption for RDMA
     READ/WRITE

  Other changes:

   - Parse and retain AppInstanceVersion contexts, enforce version
     ordering, close older active handles for newer takeovers, and
     reject invalid or unversioned opens according to the SMB2 semantics

   - Accept durable reconnect requests that omit VolatileFileId when the
     persistent ID and reconnect context identify the handle, while
     continuing to reject explicit volatile-ID mismatches

   - Fix SMB2/SMB3 protocol validation and security issues, including
     request offsets, file and object IDs, IPC responses, output buffer
     sizes, SMB3.1.1 binding validation, signing-required handling,
     durable handles, ACLs, maximal access, and security information

   - Fix heap out-of-bounds accesses, use-after-free bugs, memory leaks,
     invalid pointer dereferences, and sensitive-data lifetime issues in
     authentication, Kerberos, preauthentication, sessions, connections,
     and module teardown

   - Correct alternate-data-stream and named-stream handling, COPYCHUNK
     behavior, sparse-file and compression attributes, allocated-range
     queries, file trimming, duplicate extents, DOS attributes,
     snapshots, normalized names, and partial information responses

   - Fix locking, lease, oplock, durable reconnect, async request, and
     CHANGE_NOTIFY races, including deferred-lock rollback, parent
     directory lease notifications, and connection teardown lifetime
     bugs

   - Fix SMB3 encryption handling for compressed requests, expired
     encrypted sessions, interim responses, bound multichannel
     connections, and decryption failures

   - Fix SMB3 multichannel session lookup and session state transitions
     so changes are scoped to the correct bound connections and cannot
     revive connections that are already shutting down

   - Fix DACL access checks so ACE walks are bounded by the declared
     DACL size, preventing data beyond the DACL boundary from being
     interpreted during access validation

   - Fix session accounting and lifetime issues, including session
     counter updates during publication and removal, session leaks on
     registration failure, and procfs creation diagnostics

   - Improve TCP connection reliability by enabling TCP keepalive for
     accepted connections and preserving TCP timers for kernel sockets,
     preventing silent peers from holding connections indefinitely

   - Fix smbdirect RDMA cleanup ordering for completion queues, QPs,
     child sockets, and listener locking

   - Improve async response framing, multi-iovec signing, RPC pipe
     status handling, and ksmbd procfs monitoring for server, share,
     connection, session, and open-file state

   - Remove the obsolete DES crypto header and Kconfig dependency now
     that NTLMv1 support has been removed

   - Update the ksmbd repository URL in MAINTAINERS and add an
     additional KSMBD reviewer"

* tag 'ksmbd-for-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb: (142 commits)
  MAINTAINERS: update ksmbd repository URL
  MAINTAINERS: add myself as KSMBD reviewer
  smb: server: remove unused DES crypto header
  smb: server: Remove obsolete "select CRYPTO_LIB_DES" from Kconfig file
  ksmbd: keep TCP timers alive for kernel sockets
  ksmbd: enable TCP keepalive for accepted connections
  smb/server: fix session counter on session removal
  smb/server: update session counter under sessions table lock
  smb/server: fix session leak in ksmbd_session_register()
  smb/server: warn if ksmbd_proc_create() fails
  ksmbd: bound smb_check_perm_dacl() ACE walks by DACL size
  ksmbd: make RDMA encryption diagnostics conditional
  ksmbd: add SMB Direct RDMA encryption transform
  ksmbd: handle encrypted compressed requests
  ksmbd: decrypt requests from expired encrypted sessions
  ksmbd: disconnect on SMB3 decryption failure
  ksmbd: encrypt interim responses to encrypted requests
  ksmbd: scope session state changes to bound connections
  ksmbd: fix encrypted request lookup on bound channels
  ksmbd: add per-share SMB3 encryption enforcement
  ...
</content>
</entry>
<entry>
<title>smb: server: remove unused DES crypto header</title>
<updated>2026-08-20T13:56:15Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2026-08-20T07:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=c5e640fe346177372ff4a51a45b01fcd48c29207'/>
<id>urn:sha1:c5e640fe346177372ff4a51a45b01fcd48c29207</id>
<content type='text'>
The DES crypto header is no longer used after the removal of NTLMv1
authentication. Remove it now that the server no longer selects
CRYPTO_LIB_DES.

Fixes: ce812992f239 ("ksmbd: remove NTLMv1 authentication")
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb: server: Remove obsolete "select CRYPTO_LIB_DES" from Kconfig file</title>
<updated>2026-08-20T13:56:13Z</updated>
<author>
<name>Thomas Huth</name>
<email>thuth@redhat.com</email>
</author>
<published>2026-08-20T06:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ed91d80242358ffdf127a34e3b7c9fc445c9e5d1'/>
<id>urn:sha1:ed91d80242358ffdf127a34e3b7c9fc445c9e5d1</id>
<content type='text'>
The DES encryption in the smb server code has been removed in 2021
with the removal of the insecure NTLMv1 authentication code. Thus
we don't need this "select" statement here anymore.

Fixes: ce812992f239f ("ksmbd: remove NTLMv1 authentication")
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: keep TCP timers alive for kernel sockets</title>
<updated>2026-08-20T13:56:12Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2026-08-19T23:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=80b6367ec37faf61fbd11aae6fae64c51faa5bba'/>
<id>urn:sha1:80b6367ec37faf61fbd11aae6fae64c51faa5bba</id>
<content type='text'>
ksmbd creates its listening socket with sock_create_kern(). Kernel
sockets do not hold a network namespace reference by default. Accepted
sockets inherit this state.

When an accepted socket is released, tcp_close() clears its pending TCP
timers for a kernel socket after the socket enters an orphaned state. If
the peer is unreachable while ksmbd sends a FIN, this can leave a
FIN-WAIT-1 orphan without a retransmission timer.

Upgrade the listening socket's network namespace reference before
kernel_listen(). Accepted sockets inherit the reference, so the TCP
stack can keep the retransmission timer active and apply its normal
orphan retry policy.

Preserve the existing graceful shutdown behavior.

Link: https://github.com/openwrt/openwrt/issues/24744
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: enable TCP keepalive for accepted connections</title>
<updated>2026-08-20T13:56:10Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2026-08-19T01:01:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=56549c18a4f75309161ca780feaa4d17904e3ee9'/>
<id>urn:sha1:56549c18a4f75309161ca780feaa4d17904e3ee9</id>
<content type='text'>
A client that disappears without sending a FIN or RST can leave its
ksmbd connection in ESTABLISHED indefinitely. ksmbd sets a socket
receive timeout, but the connection receive loop retries timeout errors
without a limit, so the connection remains in conn_list and consumes the
per-IP connection quota.

Enable SO_KEEPALIVE on accepted TCP sockets so the TCP stack can detect a
silent peer failure. The keepalive idle time, interval, and probe count
remain controlled by the existing TCP sysctl settings.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'libcrypto-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux</title>
<updated>2026-08-18T02:16:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-18T02:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=d47db9bf50d28647689e6743ee93c45cb755ffc3'/>
<id>urn:sha1:d47db9bf50d28647689e6743ee93c45cb755ffc3</id>
<content type='text'>
Pull crypto library updates from Eric Biggers:
 "Add library APIs for most AES encryption modes that are used in the
  kernel (ECB, CBC, CBC-CTS, CTR, XCTR, XTS, GCM, CCM).

  These AES modes have many in-kernel users that are currently using the
  crypto_skcipher or crypto_aead APIs. These existing APIs are difficult
  to use and inefficient. Until now, the lack of proper library support
  for these has been the main gap in the crypto library.

  This set of changes is the next stage of addressing it:

   - Implement the new APIs on top of the existing support for
     single-block AES in the library.

   - Fully document the new APIs.

   - Migrate the only user of the old AES-GCM library API to the new,
     more flexible API; then remove the old API and its implementation.

   - Wire up the new APIs to the traditional crypto API by adding
     crypto_skcipher and crypto_aead algorithms.

     This makes the new APIs be covered by the traditional crypto API's
     self-tests. It also makes them be already used for real on systems
     that don't have architecture-optimized code for these modes.

     But most importantly, this is a prerequisite for migrating the
     architecture-optimized code for these AES modes (i.e.
     arch/*/crypto/aes*) into the library, which as usual will eliminate
     a lot of redundant "glue" code.

  Note that unlike some of the other algorithms that have been migrated
  to the library, e.g. SHA-512, for these AES modes there was too much
  to get done in one cycle. Nor did it make sense to handle these modes
  one at a time, because they tend to be coupled together or depend on
  each other, especially in the architecture-optimized AES code.

  Thus, most of the benefits (reductions in lines of code, performance
  improvements, etc.) will follow in later cycles when
  architecture-optimized code is migrated into the library and users of
  crypto_skcipher and crypto_aead are updated to use the new APIs.

  The design of the new APIs was informed by writing proof-of-concept
  patches for many kernel subsystems currently accessing these same
  algorithms via crypto_skcipher or crypto_aead (patches 18-33 of
  https://lore.kernel.org/r/20260707053503.209874-1-ebiggers@kernel.org/).

  While those patches will be resent for real later, the total diffstat
  for them was negative 1905 lines. So clearly the new APIs are quite a
  bit easier to use and align better with what users actually need.

  Besides the new AES encryption APIs, there are also a few changes for
  improved AES-CMAC key and context zeroization"

* tag 'libcrypto-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  mac80211: fils_aead: Use __cleanup() instead of memzero_explicit()
  Bluetooth: SMP: clear the aes_cmac_key when done
  smb: clear the aes_cmac_key and aes_cmac_ctx when done
  lib/crypto: aes-cmac: Add zeroization functions
  lib/crypto: aesgcm: Remove old AES-GCM library
  x86/sev: Remove obsolete virtual address check
  x86/sev: Use new AES-GCM library
  crypto: aes - Add CCM support using library
  crypto: aes - Add GCM support using library
  crypto: aes - Add XTS support using library
  crypto: aes - Add CTR and XCTR support using library
  crypto: aes - Add CBC and CBC-CTS support using library
  crypto: aes - Add ECB support using library
  lib/crypto: aes: Add CCM support
  lib/crypto: aes: Add GCM support
  lib/crypto: aes: Add XTS support
  lib/crypto: aes: Add CTR and XCTR support
  lib/crypto: aes: Add CBC and CBC-CTS support
  lib/crypto: aes: Add ECB support
  crypto: xts - Split out __xts_verify_key() helper
</content>
</entry>
<entry>
<title>Merge tag 'vfs-7.3-rc1.kthread' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-08-17T18:35:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-17T18:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=fff0150b0299f834fe2c335ce0eb5c68bb414cbd'/>
<id>urn:sha1:fff0150b0299f834fe2c335ce0eb5c68bb414cbd</id>
<content type='text'>
Pull kthread vfs updates from Christian Brauner:
 "This stops kernel threads from sharing filesystem state with
  userspace. This work is about 3 cycles old and has been in -next
  for about that time.

  When the kernel boots init_task creates PID 1 and then kthreadd. From
  that point every kthread and PID 1 share the same fs_struct. That is
  why pivot_root() has to rewrite the fs_struct of all kthreads. The
  rewriting exists so that kthreads can use init's filesystem state when
  they want to. It also means userspace can move the ground out from
  under the kernel.

  PID 1 now gets a completely separate fs_struct. All kthreads are
  anchored in a private SB_KERNMOUNT instance of nullfs that cannot be
  mounted on and cannot be used to follow other mounts. Userspace init
  can no longer affect kthread filesystem state and kthreads can no
  longer affect userspace fs state without explicit opting in to that.

  Path lookup from a kthread now fails by default. It makes it
  deliberately hard to offload security sensitive operations into init's
  filesystem state from a kthread.

  Places that legitimately need to look something up there opt in
  through the new scoped_with_init_fs() which temporarily overrides the
  caller's fs_struct with init's. usermodehelpers remain the only kernel
  tasks that genuinely share init's filesystem state, since they execute
  random binaries in the root filesystem (excellent...).

  The visible result is that /proc/2/root is a nullfs with an empty
  mountinfo while /proc/1/root is the real root"

* tag 'vfs-7.3-rc1.kthread' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (26 commits)
  initramfs_test: use test init/exit hooks to override init fs
  fs: stop rewriting paths for PF_EXITING | PF_DUMPCORE
  fs: stop rewriting kthread fs structs
  fs: start all kthreads in nullfs
  nullfs: make nullfs multi-instance
  devtmpfs: create private mount namespace
  fs: add umh argument to struct kernel_clone_args
  fs: stop sharing fs_struct between init_task and pid 1
  af_unix: use scoped_with_init_fs() for coredump socket lookup
  initramfs: use scoped_with_init_fs() for rootfs unpacking
  pnfs/blocklayout: use scoped_with_init_fs() for SCSI device lookup
  ksmbd: use scoped_with_init_fs() for VFS path operations
  ksmbd: use scoped_with_init_fs() for filesystem info path lookup
  ksmbd: use scoped_with_init_fs() for share path resolution
  fs: use scoped_with_init_fs() for kernel_read_file_from_path_initns()
  coredump: use scoped_with_init_fs() for coredump path resolution
  btrfs: use scoped_with_init_fs() for update_dev_time()
  scsi: target: use scoped_with_init_fs() for APTPL metadata
  scsi: target: use scoped_with_init_fs() for ALUA metadata
  crypto: ccp: use scoped_with_init_fs() for SEV file access
  ...
</content>
</entry>
<entry>
<title>smb/server: fix session counter on session removal</title>
<updated>2026-08-17T13:38:27Z</updated>
<author>
<name>Ze Tan</name>
<email>tanze@kylinos.cn</email>
</author>
<published>2026-08-14T13:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=7de5cf9bcf96bf2ee2ea2ad1d35a7b950f71161a'/>
<id>urn:sha1:7de5cf9bcf96bf2ee2ea2ad1d35a7b950f71161a</id>
<content type='text'>
See the procedure below:

  smb2_sess_setup
    ksmbd_smb2_session_create
      __session_create
        hash_add(sessions_table, &amp;sess-&gt;hlist, sess-&gt;id)
        ksmbd_counter_inc(KSMBD_COUNTER_SESSIONS)
  ksmbd_conn_handler_loop
    ksmbd_server_terminate_conn
      ksmbd_sessions_deregister
        hash_del(&amp;sess-&gt;hlist)
        // do not decrement KSMBD_COUNTER_SESSIONS

KSMBD_COUNTER_SESSIONS tracks sessions published in sessions_table, but
session removal does not decrement it. The value therefore keeps growing
after sessions are expired, rejected during registration, or removed on
the last channel disconnect.

Fixes: b38f99c1217a ("ksmbd: add procfs interface for runtime monitoring and statistics")
Signed-off-by: Ze Tan &lt;tanze@kylinos.cn&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb/server: update session counter under sessions table lock</title>
<updated>2026-08-17T13:38:26Z</updated>
<author>
<name>Ze Tan</name>
<email>tanze@kylinos.cn</email>
</author>
<published>2026-08-14T13:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=492b24b5b651a72ee83a8d481f70246b36192832'/>
<id>urn:sha1:492b24b5b651a72ee83a8d481f70246b36192832</id>
<content type='text'>
KSMBD_COUNTER_SESSIONS tracks sessions published in sessions_table.
Increment it while holding sessions_table_lock so publishing a session and
updating the counter happen together.

Fixes: b38f99c1217a ("ksmbd: add procfs interface for runtime monitoring and statistics")
Signed-off-by: Ze Tan &lt;tanze@kylinos.cn&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb/server: fix session leak in ksmbd_session_register()</title>
<updated>2026-08-17T13:38:26Z</updated>
<author>
<name>Ze Tan</name>
<email>tanze@kylinos.cn</email>
</author>
<published>2026-08-14T13:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=99b25b046e47e4904373cfeb445c5483f1633d88'/>
<id>urn:sha1:99b25b046e47e4904373cfeb445c5483f1633d88</id>
<content type='text'>
See the procedure below:

  smb2_sess_setup
    ksmbd_smb2_session_create
      __session_create
        atomic_set(&amp;sess-&gt;refcnt, 2)
        hash_add(sessions_table, &amp;sess-&gt;hlist, sess-&gt;id)
    ksmbd_session_register
      xa_store(&amp;conn-&gt;sessions, sess-&gt;id, sess) // fail
    ksmbd_user_session_put
      atomic_dec(&amp;sess-&gt;refcnt) // refcnt is 1, session is not freed

Remove the session from sessions_table and drop its table reference if
xa_store() fails.

Fixes: f5c779b7ddbd ("ksmbd: fix racy issue from session setup and logoff")
Signed-off-by: Ze Tan &lt;tanze@kylinos.cn&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
</feed>
