<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/fs/smb/server, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-14T11:14:42+00:00</updated>
<entry>
<title>ksmbd: print IPv6 client addresses correctly in procfs</title>
<updated>2026-09-14T11:14:42+00:00</updated>
<author>
<name>Gael Blivet</name>
<email>gael.blivet@gmail.com</email>
</author>
<published>2026-09-13T23:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c21547779b38e0d4f7449efa5707d826a220a24e'/>
<id>urn:sha1:c21547779b38e0d4f7449efa5707d826a220a24e</id>
<content type='text'>
conn-&gt;inet_addr and conn-&gt;inet6_addr share a union, and three procfs
printers choose between them by testing whether inet_addr is zero. For
an IPv6 peer that field aliases the first four bytes of the address,
which are zero only for :: prefixed addresses, so a client with a
global IPv6 address takes the IPv4 branch and is listed from those four
bytes. A client at 2001:db8::1 is listed as 32.1.13.184.

IPv4 mapped addresses begin with zero bytes, so the listing is correct
until a native IPv6 client connects.

Record the address family where the address is stored and select on
that, in the client listing and in both session listings.

Fixes: fe4dc5987d7d ("ksmbd: expose connection runtime state in procfs")
Signed-off-by: Gael Blivet &lt;gael.blivet@gmail.com&gt;
Assisted-by: Claude:claude-opus-5
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: fix AFP_AfpInfo header fields in synthesized xattr</title>
<updated>2026-09-14T11:14:41+00:00</updated>
<author>
<name>Gael Blivet</name>
<email>gael.blivet@gmail.com</email>
</author>
<published>2026-09-13T23:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f207091544d90fac46d34fc2b0a6b21c4e49d016'/>
<id>urn:sha1:f207091544d90fac46d34fc2b0a6b21c4e49d016</id>
<content type='text'>
smb2_set_stream_name_xattr() synthesizes a 60-byte AFP_AfpInfo xattr
when a client opens a nonexistent one on a Time Machine share, so the
probe is answered instead of failing with -EBADF. Its header does not
match what clients write: ksmbd uses 0x00051607 and 0x00020000 for the
first two fields and leaves the third zero.

The user.DosStream.AFP_AfpInfo:$DATA xattr a macOS client writes
begins:

  00000000: 4146 5000 0000 0100 0000 0000 0000 0080  AFP.............

Write those sixteen bytes: the signature, the version at offset 4 and
the backup time at offset 12. The 60-byte length is already correct and
the rest stays zeroed: a zero type and creator lets the client use the
file extension for icon and type detection.

Fixes: eaff8e924f60 ("ksmbd: synthesize empty AFP_AfpInfo xattr on first probe")
Signed-off-by: Gael Blivet &lt;gael.blivet@gmail.com&gt;
Assisted-by: Claude:claude-opus-5
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: look up stream size by exact xattr name</title>
<updated>2026-09-14T11:14:41+00:00</updated>
<author>
<name>Gael Blivet</name>
<email>gael.blivet@gmail.com</email>
</author>
<published>2026-09-13T23:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e2e380a92d9a6b62ac1ed1d3379487e53a9e4247'/>
<id>urn:sha1:e2e380a92d9a6b62ac1ed1d3379487e53a9e4247</id>
<content type='text'>
get_file_stream_info() walks the xattr list from a single
ksmbd_vfs_listxattr() and sizes each stream it finds with
ksmbd_vfs_casexattr_len(), which matches with strncasecmp(). Linux
xattr names are case-sensitive, so two streams differing only in case
report each other's size.

The loop already holds the exact name, so query it directly with
ksmbd_vfs_xattr_len(), which is what casexattr_len() calls once its
search succeeds. Make it non-static and declare it in vfs.h, and drop
the comment above it, which describes a different bug and no longer
matches the code.

This also drops a full listing per stream: casexattr_len() runs its own
listxattr on every call, so enumerating a file with N xattrs cost N
listings instead of one.

Fixes: 689f1eb3719d ("ksmbd: report actual xattr value length in stream enumeration")
Signed-off-by: Gael Blivet &lt;gael.blivet@gmail.com&gt;
Assisted-by: Claude:claude-opus-5
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: copy stream content when renaming to a new stream name</title>
<updated>2026-09-14T11:14:41+00:00</updated>
<author>
<name>Gael Blivet</name>
<email>gael.blivet@gmail.com</email>
</author>
<published>2026-09-13T23:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3df135ab9247b09ad73937639151a165b3fe10d3'/>
<id>urn:sha1:3df135ab9247b09ad73937639151a165b3fe10d3</id>
<content type='text'>
smb2_rename() creates the target stream with
ksmbd_vfs_setxattr(..., NULL, 0, ...), so the source stream's content
is not carried over and renaming a named stream produces a zero-length
stream.

Read the source stream and write it under the new name. The lookup is
case-insensitive because smb2_set_stream_name_xattr() stores
fp-&gt;stream.name with the client's casing, which need not be the casing
on disk. A rename to the stream the handle already refers to does
nothing; that comparison is case-insensitive too, since every lookup in
this path is. A read failure now fails the rename instead of creating
an empty target, and a write failure reports its own errno rather than
-EINVAL, since writing a value can fail where writing an empty one
could not.

Initialize s_type, which parse_stream_name() assigns only when the name
carries an explicit stream type and which selects the target xattr
name.

parse_stream_name() leaves the stream name empty when the stream part
is, as in "::$DATA" or ":", returning NULL for the first spelling and
"" for the second. Return without creating an xattr in either case,
after the base name check so that a base ending in '/' is covered too.
These previously created xattrs named "(null)" and "".

The source xattr is left in place and fp-&gt;stream.name still refers to
it, as before this change: readers of that pointer take no lock, so it
cannot be swapped here.

Signed-off-by: Gael Blivet &lt;gael.blivet@gmail.com&gt;
Assisted-by: Claude:claude-opus-5
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: test maximal-access DACL walk boundary</title>
<updated>2026-09-14T11:14:40+00:00</updated>
<author>
<name>Hang Nan</name>
<email>nanx95726@gmail.com</email>
</author>
<published>2026-08-19T03:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1feaf39388c5de02c6b4656ceb574d4c8da824ca'/>
<id>urn:sha1:1feaf39388c5de02c6b4656ceb574d4c8da824ca</id>
<content type='text'>
Add a maximal-access variant of the smb_check_perm_dacl() boundary
test.  The in-boundary ACE grants read access, while a trailing ACE
beyond the declared DACL size grants write access.

Verify that maximal-access calculation includes the in-boundary
permission and ignores the trailing permission.

Suggested-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Hang Nan &lt;nanx95726@gmail.com&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: test smb_check_perm_dacl() DACL walk boundary</title>
<updated>2026-09-14T11:14:40+00:00</updated>
<author>
<name>Hang Nan</name>
<email>nanx95726@gmail.com</email>
</author>
<published>2026-08-24T03:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=07cd84398bf568e7c3305b418205dd2a9c2f156a'/>
<id>urn:sha1:07cd84398bf568e7c3305b418205dd2a9c2f156a</id>
<content type='text'>
Drive smb_check_perm_dacl() through ksmbd's NTACL xattr path with a
crafted descriptor whose second ACE is beyond the declared DACL size.

Verify that the out-of-boundary ACE is not selected and access remains
denied.

Suggested-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Hang Nan &lt;nanx95726@gmail.com&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: add KUnit test for the DACL walk boundary</title>
<updated>2026-09-14T11:14:39+00:00</updated>
<author>
<name>Hang Nan</name>
<email>nanx95726@gmail.com</email>
</author>
<published>2026-08-19T03:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c35df2108b8acb32d5007d76f780850bb200d839'/>
<id>urn:sha1:c35df2108b8acb32d5007d76f780850bb200d839</id>
<content type='text'>
smb_check_perm_dacl() must stop walking ACEs at the DACL declared
size instead of using the enclosing security descriptor length.

Add the ksmbd KUnit test configuration and a semantic harness that
verifies a crafted access-granting ACE beyond the declared DACL size is
ignored.

Suggested-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Suggested-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Hang Nan &lt;nanx95726@gmail.com&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: refactor smb2_notify() to a blocking wait</title>
<updated>2026-09-14T11:14:39+00:00</updated>
<author>
<name>Gael Blivet</name>
<email>gael.blivet@gmail.com</email>
</author>
<published>2026-08-28T15:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bf17b09ab8b9f2df916baee3cc448d57ddbac62a'/>
<id>urn:sha1:bf17b09ab8b9f2df916baee3cc448d57ddbac62a</id>
<content type='text'>
The previous design registered a synthetic work struct (in_work)
directly on conn-&gt;async_requests and deferred the response to a
workqueue -- a bespoke async/cancel implementation duplicating what
setup_async_work(), release_async_work(), and smb2_send_interim_resp()
already provide for smb2_lock()'s pending byte-range lock.

Replace it with that same pattern: setup_async_work() on the calling
work itself, registered on fp-&gt;blocked_works, woken by cancel or by
the handle closing via the existing set_close_state_blocked_works().
This removes the synthetic work struct, the notify_pendings list and
its close-time drain, and the deferred workqueue send, leaving
smb2_notify() sharing the same async/cancel machinery as smb2_lock()
instead of its own separate copy.

The worker now blocks on ksmbd_wq for as long as the watch stays
open, instead of returning immediately. This also makes the skeleton
ready for a future event-delivery implementation on the same
blocking wait.

Suggested-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Gael Blivet &lt;gael.blivet@gmail.com&gt;
Assisted-by: Claude:claude-sonnet-5
Tested-by: ChenXiaoSong &lt;chenxiaosong@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: support compound fid in notify requests</title>
<updated>2026-09-14T11:14:38+00:00</updated>
<author>
<name>ChenXiaoSong</name>
<email>chenxiaosong@kylinos.cn</email>
</author>
<published>2026-08-25T13:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ff4208a9fe3b9b0483b9639a2f5a57da97f252a6'/>
<id>urn:sha1:ff4208a9fe3b9b0483b9639a2f5a57da97f252a6</id>
<content type='text'>
A Windows client can send a compound request containing:

  Create Request, File: &lt;share&gt;; Notify Request

The Notify Request uses FFFF...FFFF as the compound FID.

Signed-off-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ksmbd: fix overflow in dacloffset bounds check in build_sec_desc()</title>
<updated>2026-09-14T11:14:38+00:00</updated>
<author>
<name>Giorgi Kobakhia</name>
<email>gkobakhi@asu.edu</email>
</author>
<published>2026-09-12T00:08:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e71b596be599c08c76392d90774ac5a9f10c3e76'/>
<id>urn:sha1:e71b596be599c08c76392d90774ac5a9f10c3e76</id>
<content type='text'>
When the large dacl_offset is provided, dacl_offset + sizeof(struct
smb_acl) overflows on 32-bit builds and the check is passed,
Which makes le16_to_cpu(ppdacl_ptr-&gt;size) read out-of-bounds. This
only happens for dacl_offset in range [0xFFFFFFF8, 0xFFFFFFFF]. So
the oob read is max 8 bytes preceding the allocated ppntsd.

    unsigned int dacl_offset = le32_to_cpu(ppntsd-&gt;dacloffset);
    int ppdacl_size, ntacl_size = ppntsd_size - dacl_offset;

    if (!dacl_offset ||
	(dacl_offset + sizeof(struct smb_acl) &gt; ppntsd_size))
	    goto out;

Commit beff0bc9d69b ("ksmbd: fix overflow in dacloffset bounds check")
fixes similar checks in other functions. But leaves this one out,
because it is only valid for 32-bit builds.

Reproduced on 32-bit ARM with KASAN, by a client sending SMB2
SET_INFO(SEC) with dacloffset=0xfffffff8, then QUERY_INFO(SEC) on the
same file:

 BUG: KASAN: slab-out-of-bounds in build_sec_desc (fs/smb/server/smbacl.c:1105)
 Read of size 2 at addr c2a273fa by task kworker/1:1/35
 CPU: 1 UID: 0 PID: 35 Comm: kworker/1:1 Not tainted 7.3.0-rc2+ #5
 Workqueue: ksmbd-io handle_ksmbd_work
 Call trace:
  kasan_check_range from build_sec_desc (fs/smb/server/smbacl.c:1105)
  build_sec_desc from smb2_query_info (fs/smb/server/smb2pdu.c:7676)
  smb2_query_info from handle_ksmbd_work (fs/smb/server/server.c:160)
  handle_ksmbd_work from process_one_work (kernel/workqueue.c:3401)
  process_one_work from worker_thread (kernel/workqueue.c:3473)
  worker_thread from kthread (kernel/kthread.c:436)

Add overflow check.

Fixes: 8f0541186e9a ("ksmbd: fix heap-based overflow in set_ntacl_dacl()")
Cc: stable@vger.kernel.org
Assisted-by: LLM claude
Tested-by: Xiang Mei &lt;xmei5@asu.edu&gt;
Signed-off-by: Giorgi Kobakhia &lt;gkobakhi@asu.edu&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
</feed>
