<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/fs/smb/client, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/fs/smb/client?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/fs/smb/client?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-09-24T13:50:39Z</updated>
<entry>
<title>smb: client: use finish_no_open() for non-regular inodes</title>
<updated>2026-09-24T13:50:39Z</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2026-09-23T11:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e66cf1625ec4a3fe68346119f371def713fd0a4d'/>
<id>urn:sha1:e66cf1625ec4a3fe68346119f371def713fd0a4d</id>
<content type='text'>
An O_CREAT open can find an existing symlink or another non-regular
inode. cifs_atomic_open() calls finish_open() on it and attaches a
cifsFileInfo. Symlink inodes have no CIFS release operation, so the
dentry reference held by cifsFileInfo is leaked. FMODE_OPENED also
prevents the VFS from following the symlink.

Track whether cifs_do_create() returned an open server handle. For
non-regular inodes, close the handle if present, remove the pending
open, and call finish_no_open() so the VFS can continue the lookup.
Do not set FMODE_CREATED unless a regular file was opened. For
O_NOFOLLOW with __O_REGULAR, return -ELOOP before the VFS's
-EFTYPE check.

Defer closing a legacy POSIX handle on a non-regular inode until
after inode lookup. This avoids closing it again if lookup fails.

Fixes: d2c127197dfc ("cifs: implement i_op-&gt;atomic_open()")
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>smb: client: use GFP_KERNEL in get_targets()</title>
<updated>2026-09-23T01:20:18Z</updated>
<author>
<name>Fredric Cover</name>
<email>fredric.cover.lkernel@gmail.com</email>
</author>
<published>2026-09-22T17:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=031fe051abb3c1f36c2ba6346931fcdb3cddaeae'/>
<id>urn:sha1:031fe051abb3c1f36c2ba6346931fcdb3cddaeae</id>
<content type='text'>
Currently, get_targets() uses GFP_ATOMIC to allocate the cache target
iterator and to duplicate t-&gt;name. The callers of get_targets() are
in a sleepable context; therefore, switch to GFP_KERNEL to reduce
risk of failure and reduce pressure on emergency pools in low-memory
scenarios.

Signed-off-by: Fredric Cover &lt;fredric.cover.lkernel@gmail.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: update POSIX extension specification references</title>
<updated>2026-09-23T01:12:10Z</updated>
<author>
<name>ZhangGuoDong</name>
<email>zhangguodong@kylinos.cn</email>
</author>
<published>2026-09-21T01:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a1259e92e1e892f009bbebf23e1207b02e2d5708'/>
<id>urn:sha1:a1259e92e1e892f009bbebf23e1207b02e2d5708</id>
<content type='text'>
The POSIX extension specifications have now been published:
https://smb3posix.org/

Suggested-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: ZhangGuoDong &lt;zhangguodong@kylinos.cn&gt;
Reviewed-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: preserve create-context parsing errors</title>
<updated>2026-09-22T00:40:17Z</updated>
<author>
<name>Zihan Xi</name>
<email>zihanx@nebusec.ai</email>
</author>
<published>2026-09-16T15:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2e828035d5d736d904c238ae7ec3f77c0d6270bf'/>
<id>urn:sha1:2e828035d5d736d904c238ae7ec3f77c0d6270bf</id>
<content type='text'>
smb2_compound_op() saves the result from compound_send_recv() in
tmp_rc. For SMB2_OP_OPEN_QUERY it then parses the CREATE contexts, but
the final assignment of rc from tmp_rc discards a parsing error. A
malformed create-context response can therefore be reported as
successful to smb2_query_path_info().

Keep a create-context parsing error in tmp_rc so it survives per-command
response processing and is returned to the caller.

Fixes: b07687edee99 ("cifs: Improve SMB2+ stat() to work also without FILE_READ_ATTRIBUTES")
Cc: stable@vger.kernel.org
Reported-by: Vega &lt;vega@nebusec.ai&gt;
Assisted-by: LLM
Co-developed-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Zihan Xi &lt;zihanx@nebusec.ai&gt;
Tested-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: close completed creates on compound wait errors</title>
<updated>2026-09-22T00:40:17Z</updated>
<author>
<name>Zihan Xi</name>
<email>zihanx@nebusec.ai</email>
</author>
<published>2026-09-16T15:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6c5c547f037bc18f0b8d0b5db5a648f8f630ce85'/>
<id>urn:sha1:6c5c547f037bc18f0b8d0b5db5a648f8f630ce85</id>
<content type='text'>
compound_send_recv() waits for responses in order. If a later wait is
interrupted, or if a later MID fails during response synchronization, an
earlier CREATE may already have opened a remote handle. The earlier mid
is then released without invoking handle_cancelled_mid(), leaving the
remote handle open because no FID was copied to the caller.

Mark completed earlier mids as cancelled when a compound wait or MID
synchronization aborts. Keep their response buffers attached while the
MIDs are synchronized, and transfer them only after synchronization of
the processed responses, so the release path can inspect successful
CREATE responses and queue SMB2_close() after a later failure. Account for
a remote open only after the close work is allocated and before it is
queued, since the caller has not yet updated num_remote_opens. Mark the
create+close compound used by smb2_unlink() so it is not closed again.
Non-CREATE responses and compounds that already include a close keep their
existing behavior.

Fixes: e0bba0b85481 ("cifs: add compound_send_recv()")
Cc: stable@vger.kernel.org
Reported-by: Vega &lt;vega@nebusec.ai&gt;
Assisted-by: LLM
Co-developed-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Zihan Xi &lt;zihanx@nebusec.ai&gt;
Tested-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: clean up failed cached directory opens</title>
<updated>2026-09-22T00:40:17Z</updated>
<author>
<name>Zihan Xi</name>
<email>zihanx@nebusec.ai</email>
</author>
<published>2026-09-16T15:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d2ff5fb93ea83034025850266b5eed391f96b825'/>
<id>urn:sha1:d2ff5fb93ea83034025850266b5eed391f96b825</id>
<content type='text'>
open_cached_dir() sends CREATE and QUERY_INFO as a compound request. If
the CREATE succeeds but a later command returns an error, the function
must retain the CREATE FID so common cleanup can issue SMB2_close(). It
also must not treat a response error as a valid CREATE.

Validate the CREATE response before using its fields, record the FIDs, and
mark the handle open before handling errors from later compound commands.
Move the -EREMCHG reconnect handling before response validation so a
missing response does not hide the reconnect request. Count the handle
when it is marked open; confirmed close responses decrement the counter,
while existing close retry behavior remains best effort on transport
failures.

Fixes: b0f6df737a1c ("cifs: cache FILE_ALL_INFO for the shared root handle")
Cc: stable@vger.kernel.org
Reported-by: Vega &lt;vega@nebusec.ai&gt;
Assisted-by: LLM
Co-developed-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Zihan Xi &lt;zihanx@nebusec.ai&gt;
Tested-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: close handle after create-context parsing failure</title>
<updated>2026-09-22T00:40:17Z</updated>
<author>
<name>Zihan Xi</name>
<email>zihanx@nebusec.ai</email>
</author>
<published>2026-09-16T15:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=566820af017e81497fb5e9d3ad6e7ffe2828bc8b'/>
<id>urn:sha1:566820af017e81497fb5e9d3ad6e7ffe2828bc8b</id>
<content type='text'>
SMB2_open() accounts a successful CREATE response as a remote open before
parsing its create contexts.  If smb2_parse_contexts() rejects malformed
context data, SMB2_open() returns without closing the handle, leaving the
server-side handle open and num_remote_opens elevated.

Close the handle after a post-CREATE context parsing failure so the error
path releases the remote resource and balances the open count.

Fixes: af1689a9b770 ("smb: client: fix potential OOBs in smb2_parse_contexts()")
Cc: stable@vger.kernel.org
Reported-by: Vega &lt;vega@nebusec.ai&gt;
Assisted-by: LLM
Co-developed-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Zihan Xi &lt;zihanx@nebusec.ai&gt;
Tested-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: validate POSIX create context length</title>
<updated>2026-09-22T00:40:17Z</updated>
<author>
<name>Zihan Xi</name>
<email>zihanx@nebusec.ai</email>
</author>
<published>2026-09-16T15:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fa2e9900dd2a3f5a1e7ef5a8c5e8d435feedbfcc'/>
<id>urn:sha1:fa2e9900dd2a3f5a1e7ef5a8c5e8d435feedbfcc</id>
<content type='text'>
parse_posix_ctxt() reads the fixed nlink, reparse_tag, and mode fields
before checking that the POSIX create context contains them.  A short
context can pass the generic checks and still make these fixed-width
reads run past its declared data.

The current in-tree smb2_open_file() path passes a NULL posix pointer,
so this handler is not reached on the ordinary open path.  Still require
the POSIX data to cover all three fields before reading them because the
helper performs those unguarded reads.  Keep the existing soft-failure
behavior so malformed optional metadata does not fail the open.

Fixes: 69dda3059e7a ("cifs: add SMB2_open() arg to return POSIX data")
Cc: stable@vger.kernel.org
Reported-by: Vega &lt;vega@nebusec.ai&gt;
Assisted-by: LLM
Co-developed-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Zihan Xi &lt;zihanx@nebusec.ai&gt;
Tested-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: fix create context out-of-bounds reads</title>
<updated>2026-09-22T00:40:17Z</updated>
<author>
<name>Zihan Xi</name>
<email>zihanx@nebusec.ai</email>
</author>
<published>2026-09-16T15:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=67f4c1c6a1b51e203d986779299824d1c2c590a6'/>
<id>urn:sha1:67f4c1c6a1b51e203d986779299824d1c2c590a6</id>
<content type='text'>
smb2_parse_contexts() validates the complete create-context area but
does not limit each record to its Next field before dispatching it.  A
malformed chain can therefore expose bytes beyond the current context to
a handler.  The QFid handler also used a full response-structure cast
although it only reads DiskFileId.

The SMB2/SMB3 lease parsers made the same layout assumption: they read
LeaseState and LeaseFlags at canonical offsets rather than at
DataOffset.  A valid non-canonical DataOffset could therefore yield
unrelated in-bounds data, while a short DataLength was still accepted.

Limit each context to its Next value, reject offsets before the context
header, and reject malformed chains.  Bound the name range by the current
context and do not dispatch a known handler when DataLength is zero.  Read
the QFid DiskFileId only when the context data covers that field.  Parse the
lease context from DataOffset and require DataLength to match the v1 or v2
lease_context size used by ksmbd.  A size mismatch skips lease parsing
without failing the open.

Fixes: b8c32dbb0deb ("CIFS: Request SMB2.1 leases")
Fixes: f047390a097e ("CIFS: Add create lease v2 context for SMB3")
Fixes: 89a5bfa350fa ("smb3: optimize open to not send query file internal info")
Cc: stable@vger.kernel.org
Reported-by: Vega &lt;vega@nebusec.ai&gt;
Assisted-by: LLM
Co-developed-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Luxing Yin &lt;root@tr0jan.top&gt;
Signed-off-by: Zihan Xi &lt;zihanx@nebusec.ai&gt;
Tested-by: Frank Sorenson &lt;sorenson@redhat.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
<entry>
<title>smb: client: delete compound mids on send failure before unlock</title>
<updated>2026-09-20T03:58:39Z</updated>
<author>
<name>Adarsh Das</name>
<email>adarshdas950@gmail.com</email>
</author>
<published>2026-09-19T10:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8f6f8a48399f82f4a83f7b9f25b9707e0062a4f9'/>
<id>urn:sha1:8f6f8a48399f82f4a83f7b9f25b9707e0062a4f9</id>
<content type='text'>
When sending a compound request fails, smb_send_rqst() kicks off a
reconnect. compound_send_recv() still has those mids on pending_mid_q,
but it unlocks the server without removing them first.

During reconnect, cifs_abort_connection() walks pending_mid_q and runs
each mid callback. With no response yet, those callbacks return credits
and drop in_flight. Then compound_send_recv()'s send-error path returns
the same credits again. in_flight ends up decremented twice and
smb2_add_credits() WARNs.

syzbot hits this during SMB2_negotiate when the socket send fails.

cifs_call_async() already calls delete_mid() before unlock on send
failure. Do the same for compound chains and set cancelled_mid[] so the
out: path does not delete them again.

Fixes: ee258d79159a ("CIFS: Move credit processing to mid callbacks for SMB3")
Reported-by: syzbot+eeb58d2197d88720a228@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/6a727d22.40259c87.584f4.04ce.GAE@google.com
Tested-by: syzbot+eeb58d2197d88720a228@syzkaller.appspotmail.com
Assisted-by: LLM
Cc: stable@vger.kernel.org
Signed-off-by: Adarsh Das &lt;adarshdas950@gmail.com&gt;
Signed-off-by: Paulo Alcantara &lt;pc@manguebit.org&gt;
</content>
</entry>
</feed>
