linux/fs/smb/server
David Disseldorp 965eb86507 ksmbd: remove unused compression negotiate ctx packing
[ Upstream commit af36c51e0e ]

build_compression_ctxt() is currently unreachable due to
conn.compress_algorithm remaining zero (SMB3_COMPRESS_NONE).

It appears to have been broken in a couple of subtle ways over the
years:
- prior to d6c9ad23b4 ("ksmbd: use the common definitions for
  NEGOTIATE_PROTOCOL") smb2_compression_ctx.DataLength was set to 8,
  which didn't account for the single CompressionAlgorithms flexible
  array member.
- post d6c9ad23b4 smb2_compression_capabilities_context
  CompressionAlgorithms is a three member array, while
  CompressionAlgorithmCount is set to indicate only one member.
  assemble_neg_contexts() ctxt_size is also incorrectly incremented by
  sizeof(struct smb2_compression_capabilities_context) + 2, which
  assumes one flexible array member.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-05 15:18:29 +01:00
..
mgmt ksmbd: Implements sess->rpc_handle_list as xarray 2024-01-05 15:18:28 +01:00
asn1.c ksmbd: Remove duplicated codes 2024-01-05 15:18:28 +01:00
asn1.h
auth.c ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob() 2023-09-06 21:26:59 +01:00
auth.h
connection.c ksmbd: delete asynchronous work from list 2024-01-05 15:18:28 +01:00
connection.h ksmbd: fix race condition between session lookup and expire 2023-10-10 22:00:45 +02:00
crypto_ctx.c
crypto_ctx.h
glob.h
Kconfig ksmbd: update Kconfig to note Kerberos support and fix indentation 2024-01-05 15:18:28 +01:00
ksmbd_netlink.h ksmbd: set SMB2_SESSION_FLAG_ENCRYPT_DATA when enforcing data encryption for this share 2024-01-05 15:18:27 +01:00
ksmbd_spnego_negtokeninit.asn1
ksmbd_spnego_negtokentarg.asn1
ksmbd_work.c
ksmbd_work.h ksmbd: delete asynchronous work from list 2024-01-05 15:18:28 +01:00
Makefile
misc.c
misc.h
ndr.c
ndr.h
nterr.h
ntlmssp.h
oplock.c ksmbd: fix wrong DataOffset validation of create context 2023-09-06 21:26:59 +01:00
oplock.h
server.c ksmbd: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2024-01-05 15:18:27 +01:00
server.h
smb_common.c ksmbd: handle malformed smb1 message 2023-11-28 17:07:10 +00:00
smb_common.h ksmbd: replace one-element arrays with flexible-array members 2024-01-05 15:18:27 +01:00
smb2misc.c ksmbd: validate command request size 2023-08-16 18:27:20 +02:00
smb2ops.c ksmbd: set SMB2_SESSION_FLAG_ENCRYPT_DATA when enforcing data encryption for this share 2024-01-05 15:18:27 +01:00
smb2pdu.c ksmbd: remove unused compression negotiate ctx packing 2024-01-05 15:18:29 +01:00
smb2pdu.h ksmbd: delete asynchronous work from list 2024-01-05 15:18:28 +01:00
smbacl.c ksmbd: fix slab out of bounds write in smb_inherit_dacl() 2023-11-28 17:07:11 +00:00
smbacl.h
smbfsctl.h
smbstatus.h
transport_ipc.c
transport_ipc.h
transport_rdma.c ksmbd: reduce descriptor size if remaining bytes is less than request size 2023-09-06 21:26:59 +01:00
transport_rdma.h
transport_tcp.c
transport_tcp.h
unicode.c ksmbd: remove unused is_char_allowed function 2024-01-05 15:18:28 +01:00
unicode.h
uniupr.h
vfs_cache.c ksmbd: not allow to open file if delelete on close bit is set 2023-10-19 23:08:56 +02:00
vfs_cache.h
vfs.c ksmbd: Fix parameter name and comment mismatch 2024-01-05 15:18:28 +01:00
vfs.h
xattr.h