linux/fs/smb/server
Arnd Bergmann 9cedc58bdb ksmbd: avoid field overflow warning
clang warns about a possible field overflow in a memcpy:

In file included from fs/smb/server/smb_common.c:7:
include/linux/fortify-string.h:583:4: error: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
                        __write_overflow_field(p_size_field, size);

It appears to interpret the "&out[baselen + 4]" as referring to a single
byte of the character array, while the equivalen "out + baselen + 4" is
seen as an offset into the array.

I don't see that kind of warning elsewhere, so just go with the simple
rework.

Fixes: e2f34481b2 ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-06-28 22:58:28 -05:00
..
mgmt ksmbd: remove unused ksmbd_tree_conn_share function 2023-06-26 00:07:04 -05:00
asn1.c
asn1.h
auth.c
auth.h
connection.c ksmbd: validate smb request protocol id 2023-06-02 12:30:57 -05:00
connection.h
crypto_ctx.c
crypto_ctx.h
glob.h
Kconfig
ksmbd_netlink.h
ksmbd_spnego_negtokeninit.asn1
ksmbd_spnego_negtokentarg.asn1
ksmbd_work.c
ksmbd_work.h
Makefile
misc.c
misc.h
ndr.c
ndr.h
nterr.h
ntlmssp.h
oplock.c ksmbd: fix out-of-bound read in parse_lease_state() 2023-06-02 12:30:57 -05:00
oplock.h
server.c ksmbd: validate session id and tree id in the compound request 2023-06-16 21:04:51 -05:00
server.h
smb2misc.c ksmbd: fix out-of-bound read in smb2_write 2023-06-16 21:04:36 -05:00
smb2ops.c
smb2pdu.c ksmbd: add missing compound request handing in some commands 2023-06-26 00:07:04 -05:00
smb2pdu.h
smb_common.c ksmbd: avoid field overflow warning 2023-06-28 22:58:28 -05:00
smb_common.h ksmbd: Replace one-element array with flexible-array member 2023-06-26 00:07:04 -05:00
smbacl.c ksmbd: Replace the ternary conditional operator with min() 2023-06-26 00:07:04 -05:00
smbacl.h
smbfsctl.h
smbstatus.h
transport_ipc.c ksmbd: use kvzalloc instead of kvmalloc 2023-06-26 00:07:04 -05:00
transport_ipc.h
transport_rdma.c
transport_rdma.h
transport_tcp.c
transport_tcp.h
unicode.c
unicode.h
uniupr.h
vfs_cache.c ksmbd: add mnt_want_write to ksmbd vfs functions 2023-06-16 21:04:19 -05:00
vfs_cache.h
vfs.c ksmbd: use kvzalloc instead of kvmalloc 2023-06-26 00:07:04 -05:00
vfs.h ksmbd: Change the return value of ksmbd_vfs_query_maximal_access to void 2023-06-26 00:07:04 -05:00
xattr.h