linux-stable/fs/smb
Paulo Alcantara be36276cb8 smb: client: increase number of PDUs allowed in a compound request
[ Upstream commit 11d4d1dba3 ]

With the introduction of SMB2_OP_QUERY_WSL_EA, the client may now send
5 commands in a single compound request in order to query xattrs from
potential WSL reparse points, which should be fine as we currently
allow up to 5 PDUs in a single compound request.  However, if
encryption is enabled (e.g. 'seal' mount option) or enforced by the
server, current MAX_COMPOUND(5) won't be enough as we require an extra
PDU for the transform header.

Fix this by increasing MAX_COMPOUND to 7 and, while we're at it, add
an WARN_ON_ONCE() and return -EIO instead of -ENOMEM in case we
attempt to send a compound request that couldn't include the extra
transform header.

Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:26:28 +01:00
..
client smb: client: increase number of PDUs allowed in a compound request 2024-03-01 13:26:28 +01:00
common smb: client, common: fix fortify warnings 2024-01-20 11:50:04 +01:00
server ksmbd: free aux buffer if ksmbd_iov_pin_rsp_read fails 2024-02-23 09:12:41 +01:00
Kconfig
Makefile