<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/smb, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2026-05-14T18:21:00Z</updated>
<entry>
<title>smbdirect: Fix error cleanup in smbdirect_map_sges_from_iter()</title>
<updated>2026-05-14T18:21:00Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2026-05-13T18:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c207f1d785044667f87cc8c72355e33f3981f2d6'/>
<id>urn:sha1:c207f1d785044667f87cc8c72355e33f3981f2d6</id>
<content type='text'>
Fix smbdirect_map_sges_from_iter() to use pre-decrement, not post-decrement
so that it cleans up the correct slots.

Fixes: e5fbdde43017 ("cifs: Add a function to build an RDMA SGE list from an iterator")
Closes: https://sashiko.dev/#/patchset/20260326104544.509518-1-dhowells%40redhat.com
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
cc: Paulo Alcantara &lt;pc@manguebit.org&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: avoid integer overflow in SMB2 READ length check</title>
<updated>2026-05-14T15:55:28Z</updated>
<author>
<name>Jeremy Erazo</name>
<email>mendozayt13@gmail.com</email>
</author>
<published>2026-05-14T12:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81a874233c305d29e37fdb70b691ff4254294c0b'/>
<id>urn:sha1:81a874233c305d29e37fdb70b691ff4254294c0b</id>
<content type='text'>
SMB2 READ response validation in cifs_readv_receive() and
handle_read_data() checks data_offset + data_len against the received
buffer length.  Both values are attacker-controlled fields from the
server response and are stored as unsigned int, so the addition can
wrap before the bounds check:

	fs/smb/client/transport.c:1259
		if (!use_rdma_mr &amp;&amp; (data_offset + data_len &gt; buflen))

	fs/smb/client/smb2ops.c:4839
		else if (buf_len &gt;= data_offset + data_len)

A malicious SMB server can use this to bypass validation.  In the
non-encrypted receive path the client attempts an oversized socket
read and stalls for the SMB response timeout (180 seconds) before
reconnecting.  In the SMB3 encrypted path, runtime testing shows the
malformed length can reach copy_to_iter() in handle_read_data() with
attacker-controlled size, where usercopy hardening stops the oversized
copy before bytes reach userspace.

Guard both call sites with check_add_overflow(), which is already
used elsewhere in this subsystem (smb2pdu.c).  On overflow, treat the
response as malformed and reject with -EIO.

Signed-off-by: Jeremy Erazo &lt;mendozayt13@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: client: stage smb3_reconfigure() updates and restore ctx on failure</title>
<updated>2026-05-14T14:41:00Z</updated>
<author>
<name>DaeMyung Kang</name>
<email>charsyam@gmail.com</email>
</author>
<published>2026-05-13T13:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab26dfeba278b0efbcea012f1698cf524d9b5695'/>
<id>urn:sha1:ab26dfeba278b0efbcea012f1698cf524d9b5695</id>
<content type='text'>
smb3_reconfigure() moves strings out of cifs_sb-&gt;ctx before the
multichannel update, so a later failure can leave the live context
with NULL strings or options that do not match the session.

Stage the new ctx separately, commit it only on success, and restore
the snapshot on failure. Also make smb3_sync_session_ctx_passwords()
all-or-nothing.

Commit session passwords before channel updates so newly added channels
authenticate with the staged credentials.

Fixes: ef529f655a2c ("cifs: client: allow changing multichannel mount options on remount")
Reported-by: RAJASI MANDAL &lt;rajasimandalos@gmail.com&gt;
Closes: https://lore.kernel.org/lkml/CAEY6_V1+dzW3OD5zqXhsWyXwrDTrg5tAMGZ1AJ7_GAuRE+aevA@mail.gmail.com/
Link: https://lore.kernel.org/lkml/xkr2dlvgibq5j6gkcxd3yhhnj4atgxw2uy4eug2pxm7wy7nbms@iq6cf5taa65v/
Reviewed-by: Henrique Carvalho &lt;henrique.carvalho@suse.com&gt;
Signed-off-by: DaeMyung Kang &lt;charsyam@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb/client: fix possible infinite loop and oob read in symlink_data()</title>
<updated>2026-05-14T14:40:17Z</updated>
<author>
<name>Ye Bin</name>
<email>yebin10@huawei.com</email>
</author>
<published>2026-05-14T13:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d9a7f1f96cd617ee9e75bb22217c709038e26b8'/>
<id>urn:sha1:7d9a7f1f96cd617ee9e75bb22217c709038e26b8</id>
<content type='text'>
On 32-bit architectures, the infinite loop is as follows:

  len = p-&gt;ErrorDataLength == 0xfffffff8
  u8 *next = p-&gt;ErrorContextData + len
  next == p

On 32-bit architectures, the out-of-bounds read is as follows:

  len = p-&gt;ErrorDataLength == 0xfffffff0
  u8 *next = p-&gt;ErrorContextData + len
  next == (u8 *)p - 8

Reported-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+")
Cc: stable@vger.kernel.org
Signed-off-by: Ye Bin &lt;yebin10@huawei.com&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>SMB3.1.1: add missing QUERY_DIR info levels</title>
<updated>2026-05-12T15:13:24Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2026-05-12T02:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=603ab5ea6482c723216b59cb733e8ba248619ee9'/>
<id>urn:sha1:603ab5ea6482c723216b59cb733e8ba248619ee9</id>
<content type='text'>
New Infolevels for QUERY_DIR (and QUERY_INFO) levels 78 through 81 are
now being used by Windows clients and were added to the documentation.
Add defines for them (and correct some typos in documentation).  See
MS-SMB2 2.2.33 and MS-FSCC 2.4

Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v7.1-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6</title>
<updated>2026-05-08T17:24:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-05-08T17:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81d6f7807536a0436dfada07e9292e3702d2bed4'/>
<id>urn:sha1:81d6f7807536a0436dfada07e9292e3702d2bed4</id>
<content type='text'>
Pull smb client fixes from Steve French:

 - Fix for two ACL issues (security fix to validate dacloffset better
   and chmod fix)

 - Fix out of bounds reads (in check_wsl_eas and smb2_check_msg for
   symlinks)

 - Two Kerberos fixes including an important one when AES-256 encryption
   chosen

 - Fix open_cached_dir problem when directory leases disabled

* tag 'v7.1-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: validate dacloffset before building DACL pointers
  smb/client: fix out-of-bounds read in smb2_compound_op()
  smb/client: fix out-of-bounds read in symlink_data()
  smb: client: Zero-pad short GSS session keys per MS-SMB2
  smb: client: Use FullSessionKey for AES-256 encryption key derivation
  smb: client: use kzalloc to zero-initialize security descriptor buffer
  cifs: abort open_cached_dir if we don't request leases
</content>
</entry>
<entry>
<title>smb: client: validate dacloffset before building DACL pointers</title>
<updated>2026-05-07T19:09:36Z</updated>
<author>
<name>Michael Bommarito</name>
<email>michael.bommarito@gmail.com</email>
</author>
<published>2026-04-20T14:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f98b48151cc502ada59d9778f0112d21f2586ca3'/>
<id>urn:sha1:f98b48151cc502ada59d9778f0112d21f2586ca3</id>
<content type='text'>
parse_sec_desc(), build_sec_desc(), and the chown path in
id_mode_to_cifs_acl() all add the server-supplied dacloffset to pntsd
before proving a DACL header fits inside the returned security
descriptor.

On 32-bit builds a malicious server can return dacloffset near
U32_MAX, wrap the derived DACL pointer below end_of_acl, and then slip
past the later pointer-based bounds checks. build_sec_desc() and
id_mode_to_cifs_acl() can then dereference DACL fields from the wrapped
pointer in the chmod/chown rewrite paths.

Validate dacloffset numerically before building any DACL pointer and
reuse the same helper at the three DACL entry points.

Fixes: bc3e9dd9d104 ("cifs: Change SIDs in ACEs while transferring file ownership.")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Michael Bommarito &lt;michael.bommarito@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb/client: fix out-of-bounds read in smb2_compound_op()</title>
<updated>2026-05-07T19:09:32Z</updated>
<author>
<name>Zisen Ye</name>
<email>zisenye@stu.xidian.edu.cn</email>
</author>
<published>2026-05-06T03:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d09328dfda089675e4c049f3f256064a1d1996b'/>
<id>urn:sha1:8d09328dfda089675e4c049f3f256064a1d1996b</id>
<content type='text'>
If a server sends a truncated response but a large OutputBufferLength, and
terminates the EA list early, check_wsl_eas() returns success without
validating that the entire OutputBufferLength fits within iov_len.

Then smb2_compound_op() does:
    memcpy(idata-&gt;wsl.eas, data[0], size[0]);

Where size[0] is OutputBufferLength. If iov_len is smaller than size[0],
memcpy can read beyond the end of the rsp_iov allocation and leak adjacent
kernel heap memory.

Link: https://lore.kernel.org/linux-cifs/d998240c-aca9-420d-9dbd-f5ba24af19e0@chenxiaosong.com/
Fixes: ea41367b2a60 ("smb: client: introduce SMB2_OP_QUERY_WSL_EA")
Cc: stable@vger.kernel.org
Signed-off-by: Zisen Ye &lt;zisenye@stu.xidian.edu.cn&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb/client: fix out-of-bounds read in symlink_data()</title>
<updated>2026-05-07T19:09:29Z</updated>
<author>
<name>Zisen Ye</name>
<email>zisenye@stu.xidian.edu.cn</email>
</author>
<published>2026-05-02T10:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d62b8d236fab503c6fec1d3e9a38bea71feaca20'/>
<id>urn:sha1:d62b8d236fab503c6fec1d3e9a38bea71feaca20</id>
<content type='text'>
Since smb2_check_message() returns success without length validation for
the symlink error response, in symlink_data() it is possible for
iov-&gt;iov_len to be smaller than sizeof(struct smb2_err_rsp). If the buffer
only contains the base SMB2 header (64 bytes), accessing
err-&gt;ErrorContextCount (at offset 66) or err-&gt;ByteCount later in
symlink_data() will cause an out-of-bounds read.

Link: https://lore.kernel.org/linux-cifs/297d8d9b-adf7-42fd-a1c2-5b1f230032bc@chenxiaosong.com/
Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+")
Cc: Stable@vger.kernel.org
Signed-off-by: Zisen Ye &lt;zisenye@stu.xidian.edu.cn&gt;
Reviewed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Zero-pad short GSS session keys per MS-SMB2</title>
<updated>2026-05-07T19:09:01Z</updated>
<author>
<name>Piyush Sachdeva</name>
<email>s.piyush1024@gmail.com</email>
</author>
<published>2026-05-07T16:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8cb6fc3231500233ddaf63cb7fd5435008d9ed5f'/>
<id>urn:sha1:8cb6fc3231500233ddaf63cb7fd5435008d9ed5f</id>
<content type='text'>
Per MS-SMB2 section 3.2.5.3, Session.SessionKey is the first 16 bytes
of the GSS cryptographic key, right-padded with zero bytes if the key
is shorter than 16 bytes.

SMB2_auth_kerberos() copies the GSS session key from the cifs.upcall
response using kmemdup(msg-&gt;data, msg-&gt;sesskey_len, ...) and stores
the GSS-reported length verbatim in ses-&gt;auth_key.len. generate_key()
reads SMB2_NTLMV2_SESSKEY_SIZE bytes from this buffer when feeding the
HMAC-SHA256 KDF for signing key derivation. If a GSS mechanism returns
a session key shorter than 16 bytes (e.g. a deprecated single-DES
Kerberos enctype with an 8-byte session key), the KDF call performs an
out-of-bounds slab read and derives keys that do not match the server,
which pads per the spec.

Modern KDCs disable short-key enctypes by default, so this is latent
rather than reachable in production, but it is still a kernel heap
over-read.

Allocate auth_key.response with kzalloc() at a length of
max(msg-&gt;sesskey_len, SMB2_NTLMV2_SESSKEY_SIZE), copy the GSS key in,
and rely on kzalloc()'s zero initialization for the spec-mandated
padding. Set ses-&gt;auth_key.len to the padded length. Larger GSS keys
(e.g. the 32-byte aes256-cts-hmac-sha1-96 session key) continue to be
stored at their natural length, preserving the FullSessionKey path.

Emit a cifs_dbg(VFS, ...) message when a short key is encountered to
surface deprecated-enctype usage.

NTLMv2 and NTLMSSP code paths produce a 16-byte session key by
construction and are unaffected.

Signed-off-by: Piyush Sachdeva &lt;psachdeva@microsoft.com&gt;
Signed-off-by: Piyush Sachdeva &lt;s.piyush1024@gmail.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
