linux/fs/ksmbd
Namjae Jeon 6bb4399303 ksmbd: validate length in smb2_write()
[ Upstream commit 158a66b245 ]

The SMB2 Write packet contains data that is to be written
to a file or to a pipe. Depending on the client, there may
be padding between the header and the data field.
Currently, the length is validated only in the case padding
is present.

Since the DataOffset field always points to the beginning
of the data, there is no need to have a special case for
padding. By removing this, the length is validated in both
cases.

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-23 10:41:51 +01:00
..
mgmt ksmbd: fix racy issue while destroying session on multichannel 2023-05-17 11:50:28 +02:00
asn1.c ksmbd: use oid registry functions to decode OIDs 2023-12-23 10:41:49 +01:00
asn1.h
auth.c ksmbd: add support for key exchange 2023-12-23 10:41:50 +01:00
auth.h ksmbd: fix racy issue while destroying session on multichannel 2023-05-17 11:50:28 +02:00
connection.c ksmbd: add smb-direct shutdown 2023-12-23 10:41:50 +01:00
connection.h ksmbd: add smb-direct shutdown 2023-12-23 10:41:50 +01:00
crypto_ctx.c ksmbd: remove NTLMv1 authentication 2021-09-29 16:17:34 -05:00
crypto_ctx.h ksmbd: remove NTLMv1 authentication 2021-09-29 16:17:34 -05:00
glob.h ksmbd: fix version mismatch with out of tree 2021-10-07 10:18:34 -05:00
Kconfig ksmbd: remove md4 leftovers 2023-12-23 10:41:49 +01:00
ksmbd_netlink.h ksmbd: add max connections parameter 2023-02-01 08:27:24 +01:00
ksmbd_spnego_negtokeninit.asn1
ksmbd_spnego_negtokentarg.asn1
ksmbd_work.c ksmbd: Remove redundant 'flush_workqueue()' calls 2023-12-23 10:41:49 +01:00
ksmbd_work.h ksmbd: remove smb2_buf_length in smb2_hdr 2023-12-23 10:41:49 +01:00
Makefile
misc.c ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
misc.h ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
ndr.c ksmbd: downgrade ndr version error message to debug 2023-02-01 08:27:24 +01:00
ndr.h ksmbd: add user namespace support 2021-07-02 16:27:10 +09:00
nterr.h
ntlmssp.h
oplock.c ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
oplock.h ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
server.c ksmbd: shorten experimental warning on loading the module 2023-12-23 10:41:50 +01:00
server.h ksmbd: add max connections parameter 2023-02-01 08:27:24 +01:00
smb2misc.c ksmbd: validate command request size 2023-08-16 18:21:57 +02:00
smb2ops.c ksmbd: add support for smb2 max credit parameter 2022-01-27 11:02:53 +01:00
smb2pdu.c ksmbd: validate length in smb2_write() 2023-12-23 10:41:51 +01:00
smb2pdu.h ksmbd: store fids as opaque u64 integers 2023-12-23 10:41:50 +01:00
smb_common.c ksmbd: remove smb2_buf_length in smb2_hdr 2023-12-23 10:41:49 +01:00
smb_common.h ksmbd: remove smb2_buf_length in smb2_hdr 2023-12-23 10:41:49 +01:00
smbacl.c ksmbd: fix slab out of bounds write in smb_inherit_dacl() 2023-11-28 16:56:33 +00:00
smbacl.h ksmbd: fix heap-based overflow in set_ntacl_dacl() 2022-08-21 15:17:48 +02:00
smbfsctl.h
smbstatus.h
transport_ipc.c ksmbd: add max connections parameter 2023-02-01 08:27:24 +01:00
transport_ipc.h ksmbd: throttle session setup failures to avoid dictionary attacks 2021-10-20 00:07:10 -05:00
transport_rdma.c ksmbd: add smb-direct shutdown 2023-12-23 10:41:50 +01:00
transport_rdma.h ksmbd: set 445 port to smbdirect port by default 2023-12-23 10:41:50 +01:00
transport_tcp.c ksmbd: use netif_is_bridge_port 2023-12-23 10:41:50 +01:00
transport_tcp.h
unicode.c
unicode.h
uniupr.h
vfs_cache.c ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
vfs_cache.h ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
vfs.c ksmbd: remove filename in ksmbd_file 2023-12-23 10:41:51 +01:00
vfs.h ksmbd: don't align last entry offset in smb2 query directory 2022-02-23 12:03:18 +01:00
xattr.h ksmbd: reorder and document on-disk and netlink structures in headers 2021-06-30 14:47:24 +09:00