<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/cifs/sess.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2023-05-24T21:29:21+00:00</updated>
<entry>
<title>smb: move client and server files to common directory fs/smb</title>
<updated>2023-05-24T21:29:21+00:00</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2023-05-22T01:46:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=38c8a9a52082579090e34c033d439ed2cd1a462d'/>
<id>urn:sha1:38c8a9a52082579090e34c033d439ed2cd1a462d</id>
<content type='text'>
Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko
and helper modules) to new fs/smb subdirectory:

   fs/cifs --&gt; fs/smb/client
   fs/ksmbd --&gt; fs/smb/server
   fs/smbfs_common --&gt; fs/smb/common

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname</title>
<updated>2023-05-02T14:41:09+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2023-04-21T18:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=90c49fce1c43e1cc152695e20363ff5087897c09'/>
<id>urn:sha1:90c49fce1c43e1cc152695e20363ff5087897c09</id>
<content type='text'>
TCP_Server_Info::hostname may be updated once or many times during
reconnect, so protect its access outside reconnect path as well and
then prevent any potential use-after-free bugs.

Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: get rid of dns resolve worker</title>
<updated>2023-02-20T23:25:43+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2023-02-20T19:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0e9bd27b2a635d54665fcc1d6398a5f6aeb6b0cb'/>
<id>urn:sha1:0e9bd27b2a635d54665fcc1d6398a5f6aeb6b0cb</id>
<content type='text'>
We already upcall to resolve hostnames during reconnect by calling
reconn_set_ipaddr_from_hostname(), so there is no point in having a
worker to periodically call it.

Signed-off-by: Paulo Alcantara (SUSE) &lt;pc@manguebit.com&gt;
Reviewed-by &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: fix potential memory leaks in session setup</title>
<updated>2023-01-11T05:24:37+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@cjr.nz</email>
</author>
<published>2023-01-10T23:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2fe58d977ee05da5bb89ef5dc4f5bf2dc15db46f'/>
<id>urn:sha1:2fe58d977ee05da5bb89ef5dc4f5bf2dc15db46f</id>
<content type='text'>
Make sure to free cifs_ses::auth_key.response before allocating it as
we might end up leaking memory in reconnect or mounting.

Signed-off-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: refcount only the selected iface during interface update</title>
<updated>2023-01-05T05:17:39+00:00</updated>
<author>
<name>Shyam Prasad N</name>
<email>sprasad@microsoft.com</email>
</author>
<published>2022-12-27T11:29:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7246210ecdd0cda97fa3e3bb15c32c6c2d9a23b5'/>
<id>urn:sha1:7246210ecdd0cda97fa3e3bb15c32c6c2d9a23b5</id>
<content type='text'>
When the server interface for a channel is not active anymore,
we have the logic to select an alternative interface. However
this was not breaking out of the loop as soon as a new alternative
was found. As a result, some interfaces may get refcounted unintentionally.

There was also a bug in checking if we found an alternate iface.
Fixed that too.

Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary")
Cc: stable@vger.kernel.org # 5.19+
Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Use after free in debug code</title>
<updated>2022-11-19T20:27:37+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-11-18T11:48:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f391d6ee002ea022c62dc0b09d0578f3ccce81be'/>
<id>urn:sha1:f391d6ee002ea022c62dc0b09d0578f3ccce81be</id>
<content type='text'>
This debug code dereferences "old_iface" after it was already freed by
the call to release_iface().  Re-order the debugging to avoid this
issue.

Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary")
Cc: stable@vger.kernel.org # 5.19+
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Fix xid leak in cifs_ses_add_channel()</title>
<updated>2022-10-18T16:33:43+00:00</updated>
<author>
<name>Zhang Xiaoxu</name>
<email>zhangxiaoxu5@huawei.com</email>
</author>
<published>2022-10-17T14:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e909d054bdea75ef1ec48c18c5936affdaecbb2c'/>
<id>urn:sha1:e909d054bdea75ef1ec48c18c5936affdaecbb2c</id>
<content type='text'>
Before return, should free the xid, otherwise, the
xid will be leaked.

Fixes: d70e9fa55884 ("cifs: try opening channels after mounting")
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Signed-off-by: Zhang Xiaoxu &lt;zhangxiaoxu5@huawei.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: fix double-fault crash during ntlmssp</title>
<updated>2022-10-15T15:04:38+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@cjr.nz</email>
</author>
<published>2022-10-14T20:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b854b4ee66437e6e1622fda90529c814978cb4ca'/>
<id>urn:sha1:b854b4ee66437e6e1622fda90529c814978cb4ca</id>
<content type='text'>
The crash occurred because we were calling memzero_explicit() on an
already freed sess_data::iov[1] (ntlmsspblob) in sess_free_buffer().

Fix this by not calling memzero_explicit() on sess_data::iov[1] as
it's already by handled by callers.

Fixes: a4e430c8c8ba ("cifs: replace kfree() with kfree_sensitive() for sensitive data")
Reviewed-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Signed-off-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: use ALIGN() and round_up() macros</title>
<updated>2022-10-13T14:36:39+00:00</updated>
<author>
<name>Enzo Matsumiya</name>
<email>ematsumiya@suse.de</email>
</author>
<published>2022-10-13T03:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d7173623bf0b1503bc4e6f13cd0fccab5e98c6ce'/>
<id>urn:sha1:d7173623bf0b1503bc4e6f13cd0fccab5e98c6ce</id>
<content type='text'>
Improve code readability by using existing macros:

Replace hardcoded alignment computations (e.g. (len + 7) &amp; ~0x7) by
ALIGN()/IS_ALIGNED() macros.

Also replace (DIV_ROUND_UP(len, 8) * 8) with ALIGN(len, 8), which, if
not optimized by the compiler, has the overhead of a multiplication
and a division. Do the same for roundup() by replacing it by round_up()
(division-less version, but requires the multiple to be a power of 2,
which is always the case for us).

And remove some unnecessary checks where !IS_ALIGNED() would fit, but
calling round_up() directly is fine as it's a no-op if the value is
already aligned.

Signed-off-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: replace kfree() with kfree_sensitive() for sensitive data</title>
<updated>2022-10-08T04:06:48+00:00</updated>
<author>
<name>Enzo Matsumiya</name>
<email>ematsumiya@suse.de</email>
</author>
<published>2022-09-20T18:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a4e430c8c8ba96be8c6ec4f2eb108bb8bcbee069'/>
<id>urn:sha1:a4e430c8c8ba96be8c6ec4f2eb108bb8bcbee069</id>
<content type='text'>
Replace kfree with kfree_sensitive, or prepend memzero_explicit() in
other cases, when freeing sensitive material that could still be left
in memory.

Signed-off-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Link: https://lore.kernel.org/r/202209201529.ec633796-oliver.sang@intel.com
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
