]> www.infradead.org Git - users/willy/xarray.git/commit
ksmbd: the buffer of smb2 query dir response has at least 1 byte
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 20 Aug 2024 13:07:38 +0000 (22:07 +0900)
committerSteve French <stfrench@microsoft.com>
Thu, 22 Aug 2024 14:52:00 +0000 (09:52 -0500)
commitce61b605a00502c59311d0a4b1f58d62b48272d0
treee341b78f24cbf90f133291be99bfefc97d7c7eb7
parentb311c1b497e51a628aa89e7cb954481e5f9dced2
ksmbd: the buffer of smb2 query dir response has at least 1 byte

When STATUS_NO_MORE_FILES status is set to smb2 query dir response,
->StructureSize is set to 9, which mean buffer has 1 byte.
This issue occurs because ->Buffer[1] in smb2_query_directory_rsp to
flex-array.

Fixes: eb3e28c1e89b ("smb3: Replace smb2pdu 1-element arrays with flex-arrays")
Cc: stable@vger.kernel.org # v6.1+
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c