<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/smb/client/smb2ops.c, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-19T15:08:45Z</updated>
<entry>
<title>smb: client: fix iface port assignment in parse_server_interfaces</title>
<updated>2026-03-19T15:08:45Z</updated>
<author>
<name>Henrique Carvalho</name>
</author>
<published>2026-03-11T23:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b753ece265242069dfbd9673b62f11b61b8c4f4'/>
<id>urn:sha1:9b753ece265242069dfbd9673b62f11b61b8c4f4</id>
<content type='text'>
commit d4c7210d2f3ea481a6481f03040a64d9077a6172 upstream.

parse_server_interfaces() initializes interface socket addresses with
CIFS_PORT. When the mount uses a non-default port this overwrites the
configured destination port.

Later, cifs_chan_update_iface() copies this sockaddr into server-&gt;dstaddr,
causing reconnect attempts to use the wrong port after server interface
updates.

Use the existing port from server-&gt;dstaddr instead.

Cc: stable@vger.kernel.org
Fixes: fe856be475f7 ("CIFS: parse and store info on iface queries")
Tested-by: Dr. Thomas Orgis &lt;thomas.orgis@uni-hamburg.de&gt;
Reviewed-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Signed-off-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cifs: some missing initializations on replay</title>
<updated>2026-03-04T12:21:32Z</updated>
<author>
<name>Shyam Prasad N</name>
</author>
<published>2026-02-14T10:29:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c9ce68192eef14c777cb6ce17155d2eb2431aea'/>
<id>urn:sha1:7c9ce68192eef14c777cb6ce17155d2eb2431aea</id>
<content type='text'>
[ Upstream commit 14f66f44646333d2bfd7ece36585874fd72f8286 ]

In several places in the code, we have a label to signify
the start of the code where a request can be replayed if
necessary. However, some of these places were missing the
necessary reinitializations of certain local variables
before replay.

This change makes sure that these variables get initialized
after the label.

Cc: stable@vger.kernel.org
Reported-by: Yuchan Nam &lt;entropy1110@gmail.com&gt;
Tested-by: Yuchan Nam &lt;entropy1110@gmail.com&gt;
Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: Fix locking usage for tcon fields</title>
<updated>2026-03-04T12:21:25Z</updated>
<author>
<name>Shyam Prasad N</name>
</author>
<published>2026-01-31T18:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3969db6b22e3d90d8c5f22ac1a7fe0350a94c136'/>
<id>urn:sha1:3969db6b22e3d90d8c5f22ac1a7fe0350a94c136</id>
<content type='text'>
[ Upstream commit 96c4af418586ee9a6aab61738644366426e05316 ]

We used to use the cifs_tcp_ses_lock to protect a lot of objects
that are not just the server, ses or tcon lists. We later introduced
srv_lock, ses_lock and tc_lock to protect fields within the
corresponding structs. This was done to provide a more granular
protection and avoid unnecessary serialization.

There were still a couple of uses of cifs_tcp_ses_lock to provide
tcon fields. In this patch, I've replaced them with tc_lock.

Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb: client: prevent races in -&gt;query_interfaces()</title>
<updated>2026-03-04T12:19:32Z</updated>
<author>
<name>Henrique Carvalho</name>
</author>
<published>2026-01-19T17:54:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6287eefaf21ec805d42f941bd368018cf397a7f5'/>
<id>urn:sha1:6287eefaf21ec805d42f941bd368018cf397a7f5</id>
<content type='text'>
[ Upstream commit c3c06e42e1527716c54f3ad2ced6a034b5f3a489 ]

It was possible for two query interface works to be concurrently trying
to update the interfaces.

Prevent this by checking and updating iface_last_update under
iface_lock.

Signed-off-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb: client: fix potential cfid UAF in smb2_query_info_compound</title>
<updated>2025-10-28T13:41:36Z</updated>
<author>
<name>Henrique Carvalho</name>
</author>
<published>2025-10-27T21:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c76f9961c170552c1d07c830b5e145475151600'/>
<id>urn:sha1:5c76f9961c170552c1d07c830b5e145475151600</id>
<content type='text'>
When smb2_query_info_compound() retries, a previously allocated cfid may
have been freed in the first attempt.
Because cfid wasn't reset on replay, later cleanup could act on a stale
pointer, leading to a potential use-after-free.

Reinitialize cfid to NULL under the replay label.

Example trace (trimmed):

refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 11224 at ../lib/refcount.c:28 refcount_warn_saturate+0x9c/0x110
[...]
RIP: 0010:refcount_warn_saturate+0x9c/0x110
[...]
Call Trace:
 &lt;TASK&gt;
 smb2_query_info_compound+0x29c/0x5c0 [cifs f90b72658819bd21c94769b6a652029a07a7172f]
 ? step_into+0x10d/0x690
 ? __legitimize_path+0x28/0x60
 smb2_queryfs+0x6a/0xf0 [cifs f90b72658819bd21c94769b6a652029a07a7172f]
 smb311_queryfs+0x12d/0x140 [cifs f90b72658819bd21c94769b6a652029a07a7172f]
 ? kmem_cache_alloc+0x18a/0x340
 ? getname_flags+0x46/0x1e0
 cifs_statfs+0x9f/0x2b0 [cifs f90b72658819bd21c94769b6a652029a07a7172f]
 statfs_by_dentry+0x67/0x90
 vfs_statfs+0x16/0xd0
 user_statfs+0x54/0xa0
 __do_sys_statfs+0x20/0x50
 do_syscall_64+0x58/0x80

Cc: stable@kernel.org
Fixes: 4f1fffa237692 ("cifs: commands that are retried should have replay flag set")
Reviewed-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Acked-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Reviewed-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Signed-off-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Call the calc_signature functions directly</title>
<updated>2025-10-23T07:47:20Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2025-10-14T17:10:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b1d7f62225a2fd024b2df5675515557169f17e7'/>
<id>urn:sha1:4b1d7f62225a2fd024b2df5675515557169f17e7</id>
<content type='text'>
As the SMB1 and SMB2/3 calc_signature functions are called from separate
sign and verify paths, just call them directly rather than using a function
pointer.  The SMB3 calc_signature then jumps to the SMB2 variant if
necessary.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
cc: Paulo Alcantara &lt;pc@manguebit.org&gt;
cc: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
cc: Tom Talpey &lt;tom@talpey.com&gt;
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Fix refcount leak for cifs_sb_tlink</title>
<updated>2025-10-16T03:09:46Z</updated>
<author>
<name>Shuhao Fu</name>
</author>
<published>2025-10-16T02:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2b77f42205ef485a647f62082c442c1cd69d3fc'/>
<id>urn:sha1:c2b77f42205ef485a647f62082c442c1cd69d3fc</id>
<content type='text'>
Fix three refcount inconsistency issues related to `cifs_sb_tlink`.

Comments for `cifs_sb_tlink` state that `cifs_put_tlink()` needs to be
called after successful calls to `cifs_sb_tlink()`. Three calls fail to
update refcount accordingly, leading to possible resource leaks.

Fixes: 8ceb98437946 ("CIFS: Move rename to ops struct")
Fixes: 2f1afe25997f ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions")
Fixes: 366ed846df60 ("cifs: Use smb 2 - 3 and cifsacl mount options setacl function")
Cc: stable@vger.kernel.org
Signed-off-by: Shuhao Fu &lt;sfual@cse.ust.hk&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: fix race with fallocate(2) and AIO+DIO</title>
<updated>2025-10-09T15:42:14Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2025-10-07T19:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dba9f997c9d9a1cade05d006ed0429a63a4eed32'/>
<id>urn:sha1:dba9f997c9d9a1cade05d006ed0429a63a4eed32</id>
<content type='text'>
AIO+DIO may extend the file size, hence we need to make sure -&gt;i_size
is stable across the entire fallocate(2) operation, otherwise it would
become a truncate and then inode size reduced back down when it
finishes.

Fix this by calling netfs_wait_for_outstanding_io() right after
acquiring -&gt;i_rwsem exclusively in cifs_fallocate() and then guarantee
a stable -&gt;i_size across fallocate(2).

Also call netfs_wait_for_outstanding_io() after truncating pagecache
to avoid any potential races with writeback.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Fixes: 210627b0aca9 ("smb: client: fix missing timestamp updates with O_TRUNC")
Cc: Frank Sorenson &lt;sorenson@redhat.com&gt;
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Fix copy_to_iter return value check</title>
<updated>2025-10-09T15:42:14Z</updated>
<author>
<name>Fushuai Wang</name>
</author>
<published>2025-10-07T08:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0cc380d0e1d36b8f2703379890e90f896f68e9e8'/>
<id>urn:sha1:0cc380d0e1d36b8f2703379890e90f896f68e9e8</id>
<content type='text'>
The return value of copy_to_iter() function will never be negative,
it is the number of bytes copied, or zero if nothing was copied.
Update the check to treat 0 as an error, and return -1 in that case.

Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list")
Acked-by: Tom Talpey &lt;tom@talpey.com&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Fushuai Wang &lt;wangfushuai@baidu.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: batch SRV_COPYCHUNK entries to cut round trips</title>
<updated>2025-10-09T15:42:14Z</updated>
<author>
<name>Henrique Carvalho</name>
</author>
<published>2025-10-04T02:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68d2e2ca1cba9259e943bcd188671b619b9770b4'/>
<id>urn:sha1:68d2e2ca1cba9259e943bcd188671b619b9770b4</id>
<content type='text'>
smb2_copychunk_range() used to send a single SRV_COPYCHUNK per
SRV_COPYCHUNK_COPY IOCTL.

Implement variable Chunks[] array in struct copychunk_ioctl and fill it
with struct copychunk (MS-SMB2 2.2.31.1.1), bounded by server-advertised
limits.

This reduces the number of IOCTL requests for large copies.

While we are at it, rename a couple variables to follow the terminology
used in the specification.

Signed-off-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
