diff options
author | Pali Rohár <pali@kernel.org> | 2024-12-26 19:55:13 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2025-06-01 20:43:57 -0500 |
commit | 56e84c64fc257a95728ee73165456b025c48d408 (patch) | |
tree | ae8006b5af1d894f4e2ffeeb8303fba5d411586e /scripts/lib/kdoc/kdoc_files.py | |
parent | 89381c72d52094988e11d23ef24a00066a0fa458 (diff) |
cifs: Fix validation of SMB1 query reparse point response
Validate the SMB1 query reparse point response per [MS-CIFS] section
2.2.7.2 NT_TRANSACT_IOCTL.
NT_TRANSACT_IOCTL response contains one word long setup data after which is
ByteCount member. So check that SetupCount is 1 before trying to read and
use ByteCount member.
Output setup data contains ReturnedDataLen member which is the output
length of executed IOCTL command by remote system. So check that output was
not truncated before transferring over network.
Change MaxSetupCount of NT_TRANSACT_IOCTL request from 4 to 1 as io_rsp
structure already expects one word long output setup data. This should
prevent server sending incompatible structure (in case it would be extended
in future, which is unlikely).
Change MaxParameterCount of NT_TRANSACT_IOCTL request from 2 to 0 as
NT IOCTL does not have any documented output parameters and this function
does not parse any output parameters at all.
Fixes: ed3e0a149b58 ("smb: client: implement ->query_reparse_point() for SMB1")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions