<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/fs/smb/client/fs_context.c, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-03-19T15:08:42Z</updated>
<entry>
<title>cifs: make default value of retrans as zero</title>
<updated>2026-03-19T15:08:42Z</updated>
<author>
<name>Shyam Prasad N</name>
<email>sprasad@microsoft.com</email>
</author>
<published>2026-03-11T05:18:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=316cc7b63fd580f1a215e3f96769cdb70e577ea2'/>
<id>urn:sha1:316cc7b63fd580f1a215e3f96769cdb70e577ea2</id>
<content type='text'>
commit e3beefd3af09f8e460ddaf39063d3d7664d7ab59 upstream.

When retrans mount option was introduced, the default value was set
as 1. However, in the light of some bugs that this has exposed recently
we should change it to 0 and retain the old behaviour before this option
was introduced.

Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Bharath SM &lt;bharathsm@microsoft.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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cifs: Fix memory and information leak in smb3_reconfigure()</title>
<updated>2026-01-02T11:57:04Z</updated>
<author>
<name>Zilin Guan</name>
<email>zilin@seu.edu.cn</email>
</author>
<published>2025-12-24T15:21:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bb82aaee16907dc4d0b9b0ca7953ceb3edc328c6'/>
<id>urn:sha1:bb82aaee16907dc4d0b9b0ca7953ceb3edc328c6</id>
<content type='text'>
[ Upstream commit cb6d5aa9c0f10074f1ad056c3e2278ad2cc7ec8d ]

In smb3_reconfigure(), if smb3_sync_session_ctx_passwords() fails, the
function returns immediately without freeing and erasing the newly
allocated new_password and new_password2. This causes both a memory leak
and a potential information leak.

Fix this by calling kfree_sensitive() on both password buffers before
returning in this error case.

Fixes: 0f0e357902957 ("cifs: during remount, make sure passwords are in sync")
Signed-off-by: Zilin Guan &lt;zilin@seu.edu.cn&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&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 memory leak in smb3_fs_context_parse_param error path</title>
<updated>2025-11-20T09:06:25Z</updated>
<author>
<name>Shaurya Rane</name>
<email>ssrane_b23@ee.vjti.ac.in</email>
</author>
<published>2025-11-18T15:02:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5'/>
<id>urn:sha1:7e4d9120cfa413dd34f4f434befc5dbe6c38b2e5</id>
<content type='text'>
Add proper cleanup of ctx-&gt;source and fc-&gt;source to the
cifs_parse_mount_err error handler. This ensures that memory allocated
for the source strings is correctly freed on all error paths, matching
the cleanup already performed in the success path by
smb3_cleanup_fs_context_contents().
Pointers are also set to NULL after freeing to prevent potential
double-free issues.

This change fixes a memory leak originally detected by syzbot. The
leak occurred when processing Opt_source mount options if an error
happened after ctx-&gt;source and fc-&gt;source were successfully
allocated but before the function completed.

The specific leak sequence was:
1. ctx-&gt;source = smb3_fs_context_fullpath(ctx, '/') allocates memory
2. fc-&gt;source = kstrdup(ctx-&gt;source, GFP_KERNEL) allocates more memory
3. A subsequent error jumps to cifs_parse_mount_err
4. The old error handler freed passwords but not the source strings,
causing the memory to leak.

This issue was not addressed by commit e8c73eb7db0a ("cifs: client:
fix memory leak in smb3_fs_context_parse_param"), which only fixed
leaks from repeated fsconfig() calls but not this error path.

Patch updated with minor change suggested by kernel test robot

Reported-by: syzbot+87be6809ed9bf6d718e3@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=87be6809ed9bf6d718e3
Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Shaurya Rane &lt;ssrane_b23@ee.vjti.ac.in&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: fix invalid username check in smb3_fs_context_parse_param()</title>
<updated>2025-11-11T16:01:47Z</updated>
<author>
<name>Yiqi Sun</name>
<email>sunyiqixm@gmail.com</email>
</author>
<published>2025-11-11T07:05:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed6612165b74f09db00ef0abaf9831895ab28b7f'/>
<id>urn:sha1:ed6612165b74f09db00ef0abaf9831895ab28b7f</id>
<content type='text'>
Since the maximum return value of strnlen(..., CIFS_MAX_USERNAME_LEN)
is CIFS_MAX_USERNAME_LEN, length check in smb3_fs_context_parse_param()
is always FALSE and invalid.

Fix the comparison in if statement.

Signed-off-by: Yiqi Sun &lt;sunyiqixm@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: client: fix memory leak in smb3_fs_context_parse_param</title>
<updated>2025-11-09T23:30:17Z</updated>
<author>
<name>Edward Adam Davis</name>
<email>eadavis@qq.com</email>
</author>
<published>2025-11-07T14:01:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e8c73eb7db0a498cd4b22d2819e6ab1a6f506bd6'/>
<id>urn:sha1:e8c73eb7db0a498cd4b22d2819e6ab1a6f506bd6</id>
<content type='text'>
The user calls fsconfig twice, but when the program exits, free() only
frees ctx-&gt;source for the second fsconfig, not the first.
Regarding fc-&gt;source, there is no code in the fs context related to its
memory reclamation.

To fix this memory leak, release the source memory corresponding to ctx
or fc before each parsing.

syzbot reported:
BUG: memory leak
unreferenced object 0xffff888128afa360 (size 96):
  backtrace (crc 79c9c7ba):
    kstrdup+0x3c/0x80 mm/util.c:84
    smb3_fs_context_parse_param+0x229b/0x36c0 fs/smb/client/fs_context.c:1444

BUG: memory leak
unreferenced object 0xffff888112c7d900 (size 96):
  backtrace (crc 79c9c7ba):
    smb3_fs_context_fullpath+0x70/0x1b0 fs/smb/client/fs_context.c:629
    smb3_fs_context_parse_param+0x2266/0x36c0 fs/smb/client/fs_context.c:1438

Reported-by: syzbot+72afd4c236e6bc3f4bac@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=72afd4c236e6bc3f4bac
Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Signed-off-by: Edward Adam Davis &lt;eadavis@qq.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Merge tag '6.18-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6</title>
<updated>2025-10-03T21:13:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-10-03T21:13:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=63e62baaa72e1aceb422f64a50408bc9b02a6022'/>
<id>urn:sha1:63e62baaa72e1aceb422f64a50408bc9b02a6022</id>
<content type='text'>
Pull smb client updates from Steve French:

 - Fix oops in crypt message

 - Remove duplicate arc4 code

 - Fix potential io_uring reconnect

 - Two important directory leases fixes and three perf improvements

 - Three minor cleanups

 - Four debug improvements (e.g. for showing more information on leases,
   and one for adding more helpful information on reconnect)

* tag '6.18-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: client: force multichannel=off when max_channels=1
  smb client: fix bug with newly created file in cached dir
  smb: client: short-circuit negative lookups when parent dir is fully cached
  smb: client: short-circuit in open_cached_dir_by_dentry() if !dentry
  smb: client: remove pointless cfid-&gt;has_lease check
  smb: client: transport: minor indentation style fix
  smb: client: transport: avoid reconnects triggered by pending task work
  smb: client: remove unused fid_lock
  smb: client: update cfid-&gt;last_access_time in open_cached_dir_by_dentry()
  smb: client: ensure open_cached_dir_by_dentry() only returns valid cfid
  smb: client: account smb directory cache usage and per-tcon totals
  smb: client: add drop_dir_cache module parameter to invalidate cached dirents
  smb: client: show lease state as R/H/W (or NONE) in open_files
  smb: client: fix crypto buffers in non-linear memory
  smb: Use arc4 library instead of duplicate arc4 code
  smb: client: add tcon information to smb2_reconnect() debug messages
</content>
</entry>
<entry>
<title>cifs: client: force multichannel=off when max_channels=1</title>
<updated>2025-10-02T03:42:15Z</updated>
<author>
<name>Rajasi Mandal</name>
<email>rajasimandal@microsoft.com</email>
</author>
<published>2025-09-22T08:24:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=37e263e68c5e27d5f1fbc1377f64f9373dc5bf15'/>
<id>urn:sha1:37e263e68c5e27d5f1fbc1377f64f9373dc5bf15</id>
<content type='text'>
Previously, specifying both multichannel and max_channels=1 as mount
options would leave multichannel enabled, even though it is not
meaningful when only one channel is allowed. This led to confusion and
inconsistent behavior, as the client would advertise multichannel
capability but never establish secondary channels.

Fix this by forcing multichannel to false whenever max_channels=1,
ensuring the mount configuration is consistent and matches user intent.
This prevents the client from advertising or attempting multichannel
support when it is not possible.

Signed-off-by: Rajasi Mandal &lt;rajasimandal@microsoft.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>change the calling conventions for vfs_parse_fs_string()</title>
<updated>2025-09-04T19:20:51Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-28T15:37:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b28f9eba12a4967eff6e8a1c0512f86f1ac7fa68'/>
<id>urn:sha1:b28f9eba12a4967eff6e8a1c0512f86f1ac7fa68</id>
<content type='text'>
Absolute majority of callers are passing the 4th argument equal to
strlen() of the 3rd one.

Drop the v_size argument, add vfs_parse_fs_qstr() for the cases that
want independent length.

Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>smb: client: default to nonativesocket under POSIX mounts</title>
<updated>2025-08-05T00:29:10Z</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.org</email>
</author>
<published>2025-07-31T23:46:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6b445309eec2bc0594f3e24c7777aeef891d386e'/>
<id>urn:sha1:6b445309eec2bc0594f3e24c7777aeef891d386e</id>
<content type='text'>
SMB3.1.1 POSIX mounts require sockets to be created with NFS reparse
points.

Cc: linux-cifs@vger.kernel.org
Cc: Ralph Boehme &lt;slow@samba.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Matthew Richardson &lt;m.richardson@ed.ac.uk&gt;
Closes: https://marc.info/?i=1124e7cd-6a46-40a6-9f44-b7664a66654b@ed.ac.uk
Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: set symlink type as native for POSIX mounts</title>
<updated>2025-08-01T05:16:19Z</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.org</email>
</author>
<published>2025-07-31T23:46:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a967e758f8e9d8ce5ef096743393df5e6e51644b'/>
<id>urn:sha1:a967e758f8e9d8ce5ef096743393df5e6e51644b</id>
<content type='text'>
SMB3.1.1 POSIX mounts require symlinks to be created natively with
IO_REPARSE_TAG_SYMLINK reparse point.

Cc: linux-cifs@vger.kernel.org
Cc: Ralph Boehme &lt;slow@samba.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Matthew Richardson &lt;m.richardson@ed.ac.uk&gt;
Closes: https://marc.info/?i=1124e7cd-6a46-40a6-9f44-b7664a66654b@ed.ac.uk
Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
