mirror-linux/fs/smb/server
Namjae Jeon 95d7a890e4 ksmbd: fix buffer validation by including null terminator size in EA length
The smb2_set_ea function, which handles Extended Attributes (EA),
was performing buffer validation checks that incorrectly omitted the size
of the null terminating character (+1 byte) for EA Name.
This patch fixes the issue by explicitly adding '+ 1' to EaNameLength where
the null terminator is expected to be present in the buffer, ensuring
the validation accurately reflects the total required buffer size.

Cc: stable@vger.kernel.org
Reported-by: Roger <roger.andersen@protonmail.com>
Reported-by: Stanislas Polu <spolu@dust.tt>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-12-14 18:35:56 -06:00
..
mgmt ksmbd: Fix refcount leak when invalid session is found on session lookup 2025-12-14 18:35:56 -06:00
Kconfig ksmbd: Use HMAC-MD5 library for NTLMv2 2025-11-30 21:11:43 -06:00
Makefile
asn1.c ksmbd: use __GFP_RETRY_MAYFAIL 2024-11-25 18:58:02 -06:00
asn1.h
auth.c ksmbd: Use HMAC-MD5 library for NTLMv2 2025-11-30 21:11:43 -06:00
auth.h ksmbd: Use HMAC-SHA256 library for message signing and key generation 2025-11-30 21:11:43 -06:00
connection.c ksmbd: replace connection list with hash table 2025-09-30 21:37:55 -05:00
connection.h ksmbd: replace connection list with hash table 2025-09-30 21:37:55 -05:00
crypto_ctx.c ksmbd: Use HMAC-MD5 library for NTLMv2 2025-11-30 21:11:43 -06:00
crypto_ctx.h ksmbd: Use HMAC-MD5 library for NTLMv2 2025-11-30 21:11:43 -06:00
glob.h ksmbd: use __GFP_RETRY_MAYFAIL 2024-11-25 18:58:02 -06:00
ksmbd_netlink.h ksmbd: add max ip connections parameter 2025-09-30 21:37:54 -05:00
ksmbd_spnego_negtokeninit.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
ksmbd_spnego_negtokentarg.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
ksmbd_work.c fs: WQ_PERCPU added to alloc_workqueue users 2025-09-19 16:15:07 +02:00
ksmbd_work.h ksmbd: fix use-after-free in ksmbd_free_work_struct 2025-03-10 12:54:28 -05:00
misc.c ksmbd: Replace strcpy + strcat to improve convert_to_nt_pathname 2025-11-30 21:11:45 -06:00
misc.h
ndr.c ksmbd: use __GFP_RETRY_MAYFAIL 2024-11-25 18:58:02 -06:00
ndr.h
ntlmssp.h
oplock.c smb: move create_durable_rsp_v2 to common/smb2pdu.h 2025-11-30 21:11:44 -06:00
oplock.h ksmbd: fix use-after-free in smb_break_all_levII_oplock() 2025-04-14 22:21:26 -05:00
server.c ksmbd: Use HMAC-MD5 library for NTLMv2 2025-11-30 21:11:43 -06:00
server.h ksmbd: add max ip connections parameter 2025-09-30 21:37:54 -05:00
smb2misc.c smb/server: remove unused nterr.h 2025-12-09 21:01:16 -06:00
smb2ops.c smb: move create_durable_rsp_v2 to common/smb2pdu.h 2025-11-30 21:11:44 -06:00
smb2pdu.c ksmbd: fix buffer validation by including null terminator size in EA length 2025-12-14 18:35:56 -06:00
smb2pdu.h smb: move create_durable_reconn to common/smb2pdu.h 2025-11-30 21:11:45 -06:00
smb_common.c smb: server: Fix extension string in ksmbd_extract_shortname() 2025-08-07 18:23:12 -05:00
smb_common.h smb/server: remove unused nterr.h 2025-12-09 21:01:16 -06:00
smbacl.c ksmbd: remove redundant DACL check in smb_check_perm_dacl 2025-12-14 18:35:56 -06:00
smbacl.h smb: common: change the data type of num_aces to le16 2025-03-02 22:50:54 -06:00
smbfsctl.h
transport_ipc.c ksmbd: ipc: fix use-after-free in ipc_msg_send_request 2025-11-30 21:11:45 -06:00
transport_ipc.h ksmbd: Remove unused functions 2025-01-15 23:24:51 -06:00
transport_rdma.c smb: server: defer the initial recv completion logic to smb_direct_negotiate_recv_work() 2025-12-14 18:35:55 -06:00
transport_rdma.h smb: server: pass ksmbd_transport to get_smbd_max_read_write_size() 2025-09-28 18:29:52 -05:00
transport_tcp.c Forty four smb client and server changesets 2025-12-03 20:23:41 -08:00
transport_tcp.h ksmbd: fix use-after-free in __smb2_lease_break_noti() 2025-04-14 22:21:26 -05:00
unicode.c ksmbd: use __GFP_RETRY_MAYFAIL 2024-11-25 18:58:02 -06:00
unicode.h fs/smb: Swing unicode common code from smb->NLS 2023-08-30 08:55:51 -05:00
vfs.c ksmbd: convert comma to semicolon 2025-12-14 18:35:56 -06:00
vfs.h smb/server: use end_removing_noperm for for target of smb2_create_link() 2025-11-14 13:15:56 +01:00
vfs_cache.c ksmbd: vfs: fix race on m_flags in vfs_cache 2025-11-30 21:11:45 -06:00
vfs_cache.h ksmbd: allow a filename to contain colons on SMB3.1.1 posix extensions 2025-08-31 17:48:38 -05:00
xattr.h ksmbd: Correct typos in multiple comments across various files 2024-09-25 21:33:22 -05:00