<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-20T14:02:00Z</updated>
<entry>
<title>cifs: Do not use the original cruid when following DFS links for multiuser mounts</title>
<updated>2021-07-20T14:02:00Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2021-07-13T02:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3e2f327959fe6acfe52875be410b1043e621c28'/>
<id>urn:sha1:c3e2f327959fe6acfe52875be410b1043e621c28</id>
<content type='text'>
commit 50630b3f1ada0bf412d3f28e73bac310448d9d6f upstream.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213565

cruid should only be used for the initial mount and after this we should use the current
users credentials.
Ignore the original cruid mount argument when creating a new context for a multiuser mount
following a DFS link.

Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
Cc: stable@vger.kernel.org # 5.11+
Reported-by: Xiaoli Feng &lt;xifeng@redhat.com&gt;
Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&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: handle reconnect of tcon when there is no cached dfs referral</title>
<updated>2021-07-20T14:02:00Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2021-07-12T15:38:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6df445822cff00b1ce919e543312fd374be8e534'/>
<id>urn:sha1:6df445822cff00b1ce919e543312fd374be8e534</id>
<content type='text'>
commit 507345b5ae6a57b7ecd7550ff39282ed20de7b8d upstream.

When there is no cached DFS referral of tcon-&gt;dfs_path, then reconnect
to same share.

Signed-off-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Cc: &lt;stable@vger.kernel.org&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: use the expiry output of dns_query to schedule next resolution</title>
<updated>2021-07-20T14:02:00Z</updated>
<author>
<name>Shyam Prasad N</name>
</author>
<published>2021-05-18T15:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22c018592af57166d2e04870ec878da07444047b'/>
<id>urn:sha1:22c018592af57166d2e04870ec878da07444047b</id>
<content type='text'>
commit 506c1da44fee32ba1d3a70413289ad58c772bba6 upstream.

We recently fixed DNS resolution of the server hostname during reconnect.
However, server IP address may change, even when the old one continues
to server (although sub-optimally).

We should schedule the next DNS resolution based on the TTL of
the DNS record used for the last resolution. This way, we resolve the
server hostname again when a DNS record expires.

Signed-off-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v5.11+
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 missing spinlock around update to ses-&gt;status</title>
<updated>2021-07-14T14:59:28Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2021-06-24T20:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ff0d9955dcd0d52fe5f4870c02f7594fce638d7'/>
<id>urn:sha1:1ff0d9955dcd0d52fe5f4870c02f7594fce638d7</id>
<content type='text'>
[ Upstream commit 0060a4f28a9ef45ae8163c0805e944a2b1546762 ]

In the other places where we update ses-&gt;status we protect the
updates via GlobalMid_Lock. So to be consistent add the same
locking around it in cifs_put_smb_ses where it was missing.

Addresses-Coverity: 1268904 ("Data race condition")
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb3: fix possible access to uninitialized pointer to DACL</title>
<updated>2021-07-14T14:59:28Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2021-06-22T22:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3bfad4315bce228557b2e6340e94096a99c21c8'/>
<id>urn:sha1:c3bfad4315bce228557b2e6340e94096a99c21c8</id>
<content type='text'>
[ Upstream commit a5628263a9f8d47d9a1548fe9d5d75ba4423a735 ]

dacl_ptr can be null so we must check for it everywhere it is
used in build_sec_desc.

Addresses-Coverity: 1475598 ("Explicit null dereference")
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smb3: fix uninitialized value for port in witness protocol move</title>
<updated>2021-07-14T14:59:27Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2021-06-19T17:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19d2497258ad98e1938c43ea00edfdd5408699a9'/>
<id>urn:sha1:19d2497258ad98e1938c43ea00edfdd5408699a9</id>
<content type='text'>
[ Upstream commit ff93b71a3eff25fe9d4364ef13b6e01d935600c6 ]

Although in practice this can not occur (since IPv4 and IPv6 are the
only two cases currently supported), it is cleaner to avoid uninitialized
variable warnings.

Addresses smatch warning:
  fs/cifs/cifs_swn.c:468 cifs_swn_store_swn_addr() error: uninitialized symbol 'port'.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
CC: Samuel Cabrero &lt;scabrero@suse.de&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 check of dfs interlinks</title>
<updated>2021-07-14T14:59:27Z</updated>
<author>
<name>Paulo Alcantara</name>
</author>
<published>2021-06-14T15:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=022474831133ed85d0216ee761b0fa4f6a55ca83'/>
<id>urn:sha1:022474831133ed85d0216ee761b0fa4f6a55ca83</id>
<content type='text'>
[ Upstream commit 889c2a700799f3b6f82210925e1faf4a9b833c4a ]

Interlink is a special type of DFS link that resolves to a different
DFS domain-based namespace.  To determine whether it is an interlink
or not, check if ReferralServers and StorageServers bits are set to 1
and 0 respectively in ReferralHeaderFlags, as specified in MS-DFSC
3.1.5.4.5 Determining Whether a Referral Response is an Interlink.

Signed-off-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: Aurelien Aptel &lt;aaptel@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>cifs: improve fallocate emulation</title>
<updated>2021-07-14T14:59:27Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2021-06-03T05:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f9f4a2d0e6fcf0673ed51195e06e47abe966900'/>
<id>urn:sha1:2f9f4a2d0e6fcf0673ed51195e06e47abe966900</id>
<content type='text'>
[ Upstream commit 966a3cb7c7db786452a87afdc3b48858fc4d4d6b ]

RHBZ: 1866684

We don't have a real fallocate in the SMB2 protocol so we used to emulate fallocate
by simply switching the file to become non-sparse. But as that could potantially consume
a lot more data than we intended to fallocate (large sparse file and fallocating a thin
slice in the middle) we would only do this IFF the fallocate request was for virtually
the entire file.

This patch improves this and starts allowing us to fallocate smaller chunks of a file by
overwriting the region with 0, for the parts that are unallocated.

The method used is to first query the server for FSCTL_QUERY_ALLOCATED_RANGES to find what
is unallocated in the fallocate range and then to only overwrite-with-zero the unallocated
ranges to fill in the holes.

As overwriting-with-zero is different from just allocating blocks, and potentially much
more expensive, we limit this to only allow fallocate ranges up to 1Mb in size.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Acked-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Acked-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&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>SMB3: incorrect file id in requests compounded with open</title>
<updated>2021-06-03T07:09:43Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2021-05-15T14:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77fbce39d0bdcc5ed03ed7bcb58b60e1fa5a66d8'/>
<id>urn:sha1:77fbce39d0bdcc5ed03ed7bcb58b60e1fa5a66d8</id>
<content type='text'>
[ Upstream commit c0d46717b95735b0eacfddbcca9df37a49de9c7a ]

See MS-SMB2 3.2.4.1.4, file ids in compounded requests should be set to
0xFFFFFFFFFFFFFFFF (we were treating it as u32 not u64 and setting
it incorrectly).

Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Reported-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>cifs: set server-&gt;cipher_type to AES-128-CCM for SMB3.0</title>
<updated>2021-06-03T07:09:23Z</updated>
<author>
<name>Aurelien Aptel</name>
</author>
<published>2021-05-21T15:19:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66f3c30420dc32e55326b3e70071d3e14832ba65'/>
<id>urn:sha1:66f3c30420dc32e55326b3e70071d3e14832ba65</id>
<content type='text'>
commit 6d2fcfe6b517fe7cbf2687adfb0a16cdcd5d9243 upstream.

SMB3.0 doesn't have encryption negotiate context but simply uses
the SMB2_GLOBAL_CAP_ENCRYPTION flag.

When that flag is present in the neg response cifs.ko uses AES-128-CCM
which is the only cipher available in this context.

cipher_type was set to the server cipher only when parsing encryption
negotiate context (SMB3.1.1).

For SMB3.0 it was set to 0. This means cipher_type value can be 0 or 1
for AES-128-CCM.

Fix this by checking for SMB3.0 and encryption capability and setting
cipher_type appropriately.

Signed-off-by: Aurelien Aptel &lt;aaptel@suse.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
